System for detection of different types of cardiac events

ABSTRACT

A system for the detection of cardiac events occurring in a human patient is provided. At least two electrodes are included in the system for obtaining an electrical signal from a patient&#39;s heart. An electrical signal processor is electrically coupled to the electrodes for processing the electrical signal and a patient alarm means is further provided and electrically coupled to the electrical signal processor. The electrical signal is acquired in the form of electrogram segments, which are categorized according to heart rate, ST segment shift and type heart rhythm (normal or abnormal). Baseline electrogram segments are tracked over time.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation-In-Part of U.S. patent applicationSer. No. 10/853,058, filed May 26, 2004, entitled “Means and Method forthe Detection of Cardiac Events,” which is a Continuation-In-Part ofU.S. patent application Ser. No. 10/642,245, filed Aug. 18, 2003,entitled “System for the Detection of Cardiac Events,” which is aContinuation-In-Part of U.S. patent application Ser. No. 10/251,505,filed Sep. 30, 2002, now U.S. Pat. No. 6,609,023.

FIELD OF USE

This invention is in the field of systems, including devices implantedwithin a human patient, for the purpose of automatically detecting theonset of a cardiac event.

BACKGROUND OF THE INVENTION

Heart disease is the leading cause of death in the United States. Aheart attack (also known as an Acute Myocardial Infarction (AMI))typically results from a thrombus that obstructs blood flow in one ormore coronary arteries. AMI is a common and life-threateningcomplication of coronary heart disease. The sooner that perfusion of themyocardium is restored (e.g., with injection of a thrombolyticmedication such as tissue plasminogen activator (tPA)), the better theprognosis and survival of the patient from the heart attack. The extentof damage to the myocardium is strongly dependent upon the length oftime prior to restoration of blood flow to the heart muscle.

Myocardial ischemia is caused by a temporary imbalance of blood (oxygen)supply and demand in the heart muscle. It is typically provoked byphysical activity or other causes of increased heart rate when one ormore of the coronary arteries are obstructed by atherosclerosis.Patients will often (but not always) experience chest discomfort(angina) when the heart muscle is experiencing ischemia.

Acute myocardial infarction and ischemia may be detected from apatient's electrocardiogram (ECG) by noting an ST segment shift (i.e.,voltage change) over a relatively short (less than 5 minutes) period oftime. However, without knowing the patient's normal ECG patterndetection from standard 12 lead ECG can be unreliable. In addition,ideal placement of subcutaneous electrodes for detection of ST segmentshifts as they would relate to a subcutaneously implanted device has notbeen explored in the prior art.

Fischell et al in U.S. Pat. Nos. 6,112,116 and 6,272,379 describeimplantable systems for detecting the onset of acute myocardialinfarction and providing both treatment and alarming to the patient.While Fischell et al discuss the detection of a shift in the S-T segmentof the patient's electrogram from an electrode within the heart as thetrigger for alarms; it may be desirable to provide more sophisticateddetection algorithms to reduce the probability of false positive andfalse negative detection. In addition while these patents describe somedesirable aspects of programming such systems, it may be desirable toprovide additional programmability and alarm control features.

Although anti-tachycardia pacemakers and Implantable CardiacDefibrillators (ICDs) can detect heart arrhythmias, none are currentlydesigned to detect ischemia and acute myocardial infarction eventsindependently or in conjunction with arrhythmias.

In U.S. Pat. Nos. 6,112,116 and 6,272,379 Fischell et al, discuss thestorage of recorded electrogram and/or electrocardiogram data; howevertechniques to optimally store the appropriate electrogram and/orelectrocardiogram data and other appropriate data in a limited amount ofsystem memory are not detailed.

In U.S. Pat. No. 5,497,780 by M. Zehender, a device is described thathas a “goal of eliminating . . . cardiac rhythm abnormality.” To dothis, Zehender requires exactly two electrodes placed within the heartand exactly one electrode placed outside the heart. Although multipleelectrodes could be used, the most practical sensor for providing anelectrogram to detect a heart attack would use a single electrode placedwithin or near to the heart.

Zehender's drawing of the algorithm consists of a single box labeled STSIGNAL ANALYSIS with no details of what the analysis comprises. His onlydescription of his detection algorithm is to use a comparison of the ECGto a reference signal of a normal ECG curve. Zehender does not discussany details to teach an algorithm by which such a comparison can bemade, nor does Zehender explain how one identifies the “normal ECGcurve”. Each patient will likely have a different “normal” baseline ECGthat will be an essential part of any system or algorithm for detectionof a heart attack or ischemia.

In addition, Zehender suggests that an ST signal analysis should becarried out every three minutes. It may be desirable to use both longerand shorter time intervals than 3 minutes so as to capture certainchanges in ECG that are seen early on or later on in the evolution of anacute myocardial infarction. Longer observation periods will also beimportant to account for minor slowly evolving changes in the “baseline”ECG. Zehender has no mention of detection of ischemia having differentnormal curves based on heart rate. To differentiate from exerciseinduced ischemia and acute myocardial infarction, it may be important tocorrelate ST segment shifts with heart rate or R-R interval.

Finally, Zehender teaches that “if an insufficient blood supply incomparison to the reference signal occurs, the corresponding abnormal STsegments can be stored in the memory in digital form or as a numericalevent in order to be available for associated telemetry at any time.”Storing only abnormal ECG segments may miss important changes inbaseline ECG. Thus it is desirable to store some historical ECG segmentsin memory even if they are not “abnormal”.

The Reveal™ subcutaneous loop Holter monitor sold by Medtronic uses twocase electrodes spaced by about 3 inches to record electrocardiograminformation looking for arrhythmias. It has no real capability to detectST segment shift and its high pass filtering would in fact precludeaccurate detection of changes in the low frequency aspects of theheart's electrical signal. Also the spacing of the electrodes it tooclose together to be able to effectively detect and record ST segmentshifts. Similarly, current external Holter monitors are primarilydesigned for capturing arrhythmia related signals from the heart.

Although often described as an electrocardiogram (ECG), the storedelectrical signal from the heart as measured from electrodes within thebody should be termed an “electrogram”. The early detection of an acutemyocardial infarction or exercise induced myocardial ischemia caused byan increased heart rate or exertion is feasible using a system thatnotes a change in a patient's electrogram. The portion of such a systemthat includes the means to detect a cardiac event is defined herein as a“cardiosaver” and the entire system including the cardiosaver and theexternal portions of the system is defined herein as a “guardiansystem.”

Furthermore, although the masculine pronouns “he” and “his” are usedherein, it should be understood that the patient or the medicalpractitioner who treats the patient could be a man or a woman. Stillfurther the term; “medical practitioner” shall be used herein to meanany person who might be involved in the medical treatment of a patient.Such a medical practitioner would include, but is not limited to, amedical doctor (e.g., a general practice physician, an internist or acardiologist), a medical technician, a paramedic, a nurse or anelectrogram analyst. A “cardiac event” includes an acute myocardialinfarction, ischemia caused by effort (such as exercise) and/or anelevated heart rate, bradycardia, tachycardia or an arrhythmia such asatrial fibrillation, atrial flutter, ventricular fibrillation, andpremature ventricular or atrial contractions (PVCs or PACs).

For the purpose of this invention, the term “electrocardiogram” isdefined to be the heart electrical signals from one or more skin surfaceelectrode(s) that are placed in a position to indicate the heart'selectrical activity (depolarization and repolarization). Anelectrocardiogram segment refers to the recording of electrocardiogramdata for either a specific length of time, such as 10 seconds, or aspecific number of heart beats, such as 10 beats. For the purposes ofthis specification the PQ segment of a patient's electrocardiogram isthe typically flat segment of a beat of an electrocardiogram that occursjust before the R wave.

For the purpose of this invention, the term “electrogram” is defined tobe the heart electrical signals from one or more implanted electrode(s)that are placed in a position to indicate the heart's electricalactivity (depolarization and repolarization). An electrogram segmentrefers to the recording of electrogram data for either a specific lengthof time, such as 10 seconds, or a specific number of heart beats, suchas 10 beats. For the purposes of this specification the PQ segment of apatient's electrogram is the typically flat segment of an electrogramthat occurs just before the R wave. For the purposes of thisspecification, the terms “detection” and “identification” of a cardiacevent have the same meaning. A beat is defined as a sub-segment of anelectrogram or electrocardiogram segment containing exactly one R wave.

Heart signal parameters are defined to be any. Heart signal parametersinclude PQ segment average value, ST segment average voltage value, Rwave peak value, ST deviation, ST shift, average signal strength, T wavepeak height, T wave average value, T wave deviation, heart rate, R-Rinterval and peak-to-peak voltage amplitude.

Heart rhythm parameters are defined to be any measured or calculatedvalue created during the processing of one or more beats of electrogramdata that pertain to heart rhythm. Heart rhythm parameters include R-Rinterval, ST segment duration and other single beat heart signalparameters, as well as parameters that classify multiple beats. Forexample, the frequency spectrum of a consecutive number of beats conveysinformation regarding the heart rhythm of those beats and is therefore aheart rhythm parameter.

SUMMARY OF THE INVENTION

The present invention is a system for the detection of cardiac events (aguardian system) that includes a device called a cardiosaver, andexternal equipment including a physician's programmer and an externalalarm system. The present invention envisions a system for earlydetection of an acute myocardial infarction or exercise inducedmyocardial ischemia caused by an increased heart rate or exertion.

In the preferred embodiment of the present invention, the cardiosaver isimplanted along with the electrodes. In an alternate embodiment, thecardiosaver and the electrodes could be external but attached to thepatient's body. Although the following descriptions of the presentinvention in most cases refer to the preferred embodiment of animplanted cardiosaver processing electrogram data from implantedelectrodes, the techniques described are equally applicable to thealternate embodiment where the external cardiosaver processeselectrocardiogram data from skin surface electrodes.

In the preferred embodiment of the cardiosaver either or bothsubcutaneous electrodes or electrodes located on a pacemaker type rightventricular or atrial leads will be used. It is also envisioned that oneor more electrodes may be placed within the superior vena cava. Oneversion of the implanted cardiosaver device using subcutaneouselectrodes would have an electrode located under the skin on thepatient's left side. This could be best located between 2 and 20 inchesbelow the patient's left arm pit. The cardiosaver case that would act asthe indifferent electrode would typically be implanted like a pacemakerunder the skin on the left side of the patient's chest.

Using one or more detection algorithms, the cardiosaver can detect achange in the patient's electrogram that is indicative of a cardiacevent, such as an acute myocardial infarction, within five minutes afterit occurs and then automatically warn the patient that the event isoccurring. To provide this warning, the guardian system includes aninternal alarm sub-system (internal alarm means) within the cardiosaverand/or an external alarm system (external alarm means). In thepreferred, implanted embodiment, the cardiosaver communicates with theexternal alarm system using a wireless radio-frequency (RF) signal.

The internal alarm means generates an internal alarm signal to warn thepatient. The internal alarm signal may be a mechanical vibration, asound or a subcutaneous electrical tickle. The external alarm system(external alarm means) will generate an external alarm signal to warnthe patient. The external alarm signal is typically a sound that can beused alone or in combination with the internal alarm signal. Theinternal or external alarm signals would be used to alert the patient toat least two different types of conditions (i.e. levels of severity): an“EMERGENCY ALARM” signaling the detection of a major cardiac event (e.g.a heart attack) and the need for immediate medical attention, and a lesscritical “SEE DOCTOR ALERT” (or alarm) signaling the detection of a lessserious non life threatening condition such as exercise inducedischemia. The SEE DOCTOR alert signal would be used to tell the patientthat he is not in immediate danger but should arrange an appointmentwith his doctor in the near future. In addition to the signaling of lesscritical cardiac events, the SEE DOCTOR alert signal could also signalthe patient when the cardiosaver battery is getting low.

In the preferred embodiment, the internal EMERGENCY alarm signal wouldbe applied periodically, for example, with three pulses every 5 secondsafter the detection of a major cardiac event. It is also envisioned thatthe less critical SEE DOCTOR alert, would be signaled in a differentway, such as one pulse every 7 seconds.

The external alarm system is a hand-held portable device that mayinclude any or all of the following features:

-   -   1. an external alarm means to generate an external alarm signal        to alert the patient.    -   2. the capability to receive cardiac event alarms, recorded        electrogram and other data from the cardiosaver    -   3. the capability to transmit the cardiac event alarm, recorded        electrogram and other data collected by the cardiosaver to a        medical practitioner at a remote location.    -   4. an “alarm-off” or disable button that when depressed can        acknowledge that the patient is aware of the alarm and will turn        off internal and external alarm signals.    -   5. a display (typically an LCD panel) to provide information        and/or instructions to the patient by a text message and the        display of segments of the patient's electrogram.    -   6. the ability to provide messages including instructions to the        patient via a pre-recorded human voice.    -   7. a patient initiated electrogram capture initiated by a “Panic        Button” to allow the patient, even when there has been no alarm,        to initiate transmission of electrogram data from the        cardiosaver to the external alarm system for transmission to a        medical practitioner.    -   8. a patient initiated electrogram capture to initiate        transmission of electrogram data from the cardiosaver to the        external alarm system for display to a medical practitioner        using the display on the external alarm system.    -   9. the capability to automatically turn the internal and        external alarms off after a reasonable (initial alarm-on) period        that is typically less than 30 minutes if the alarm-off button        is not used. This feature might also be implemented within the        cardiosaver implant.

If the alarm disable button is not used by the patient to indicateacknowledgement of awareness of an EMERGENCY alarm, it is envisionedthat instead of completely stopping all alarm signals to the patientafter the first period of time which is an initial alarm-on period, areminder alarm signal would be turned on for a second time period whichis a reminder alarm on-period of time that would follow an off-period oftime during which time the alarm signal is turned off.

The reminder alarm signal might be repeated periodically for a thirdlonger time period which is a periodic reminder time period. Each of therepeated reminder alarm signals would last for the reminder alarmon-period and would be followed by an alarm off-period. The periodicreminder time period would typically be 3 to 5 hours because after threeto five hours the patient's advantage in being alerted to seek medicalattention for a severe cardiac event like an AMI is mostly lost. Thealarm off-period between the periodic reminder alarm signals couldeither remain constant, increase or decrease over the periodic remindertime period. For example, after an initial alarm-on time period of fiveminutes a 30 second long reminder alarm signal might occur every 10minutes for a periodic reminder time period of 3 hours, (i.e. thereminder alarm on-period is 30 seconds and the alarm off-period is 9minutes and 30 seconds). It is also envisioned that the alarm off-periodmight change during the periodic reminder time period. For example, theoff-period in the first hour of the periodic reminder time period mightbe 10 minutes increasing to 20 minutes in the last hour of the periodicreminder time period.

Text and/or spoken instructions may include a message that the patientshould promptly take some predetermined medication such as chewing anaspirin, placing a nitroglycerine tablet under his tongue, inhaling ornasal spraying a single or multiple drug combination and/or injectingthrombolytic drugs into a subcutaneous drug port. The message may be aprinted label or a context specific message displayed on a visualdisplay such as a liquid crystal display (LCD). The messaging displayedby or spoken from the external alarm system and/or a phone call from amedical practitioner who receives the alarm could also inform thepatient that he should wait for the arrival of emergency medicalservices or he should promptly proceed to an emergency medical facility.It is envisioned that the external alarm system can have directconnection to a telephone line and/or work through cell phone or otherwireless networks.

The present invention also includes an embodiment of the external alarmsystem that includes a container for medications to be taken in theevent of an EMERGENCY alarm. For example, the container might haveaspirin, PLAVIX, or another clot reducing medication and nitroglycerinewhich is a vasodilator.

If a patient seeks care in an emergency room, the external alarm systemcould provide a display to the medical practitioners in the emergencyroom of both the electrogram segment that caused the alarm and thebaseline electrogram segment against which the electrogram that causedthe alarm was compared. The ability to display both baseline and alarmelectrogram segments will significantly improve the ability of theemergency room physician to properly identify AMI.

A preferred embodiment of the external alarm system consists of anexternal alarm transceiver and a handheld computer. The external alarmtransceiver having a standardized interface, such as Compact Flashadapter interface, a secure digital (SD) card interface, a multi-mediacard interface, a memory stick interface or a PCMCIA card interface. Thestandardized interface will allow the external alarm transceiver toconnect into a similar standardized interface slot that is present inmany handheld computers such as a Palm Pilot or Pocket PC. An advantageof this embodiment is that the handheld computer can cost effectivelysupply the capability for text and graphics display and for playingspoken messages.

Using a handheld computer, such as the Handspring Treo™, Blackberry orThera™ by Audiovox™ that combines a Palm device or Pocket PC with havingan SD/Multimedia interface slot with a cell phone having wirelessinternet access, is a solution that can easily be programmed to providecommunication between the external alarm system and a diagnostic centerstaffed with medical practitioners.

The panic button feature, which allows a patient-initiated electrogramcapture and transmission to a medical practitioner, will provide thepatient with a sense of security knowing that, if he detects symptoms ofa heart-related ailment such as left arm pain, chest pain orpalpitations, he can get a fast review of his electrogram. Such a reviewwould allow the diagnosis of arrhythmias, such as premature atrial orventricular beats, atrial fibrillation, atrial flutter or other heartrhythm irregularities. The medical practitioner could then advise thepatient what action, if any, should be taken. The guardian system wouldalso be programmed to send an alarm in the case of ventricularfibrillation so that a caretaker of the patient could be informed toimmediately provide a defibrillation electrical stimulus. This ispractical as home defibrillation units are now commercially available.It is also possible that, in patients prone to ventricular fibrillationfollowing a myocardial infarction, such a home defibrillator could beplaced on the patient's chest to allow rapid defibrillation shouldventricular fibrillation occur while waiting for the emergency medicalservices to arrive.

The physician's programmer provides the patient's doctor with thecapability to set cardiosaver cardiac event detection parameters. Theprogrammer communicates with the cardiosaver using the wirelesscommunication capability that also allows the external alarm system tocommunicate with the cardiosaver. The programmer can also be used toupload and review electrogram data captured by the cardiosaver includingelectrogram segments captured before, during and after a cardiac event.

An extremely important capability of the present invention is the use ofa continuously adapting cardiac event detection program that comparesextracted features from a recently captured electrogram segment with thesame features extracted from a baseline electrogram segment at apredetermined time in the past. For example, the thresholds fordetecting an excessive ST shift would be appropriately adjusted toaccount for slow changes in electrode sensitivity or ST segment voltagelevels over time. It may also be desirable to choose the predeterminedtime in the past for comparison to take into account daily cycles in thepatient's heart electrical signals.

Thus, a preferred embodiment of the present invention would use abaseline for comparison that is an average of the baselines collectedhourly over the approximately 24 hours prior to the electrogram segmentbeing examined. Such a system would adapt to both minor (benign) slowchanges in the patient's baseline electrogram as well as any dailycycle.

Use of a system that adapts to slowly changing baseline conditions is ofgreat importance in the time following the implantation of electrodeleads in the heart. This is because there can be a significant “injurycurrent” present just after implantation of an electrode and for a timeof up to a month, as the implanted electrode heals into the wall of theheart. Such an injury current may produce a depressed ST segment thatdeviates from a normal isoelectric electrogram where the PQ and STsegments are at approximately the same voltage. Although the ST segmentmay be depressed due to this injury current, the occurrence of an acutemyocardial infarction can still be detected since an acute myocardialinfarction will still cause a significant shift from this “injurycurrent” ST baseline electrogram. Alternately, the present inventionmight be implanted and the detector could be turned on after healing ofthe electrodes into the wall of the heart. This healing would be notedin most cases by the evolution to an isoelectric electrogram (i.e., PQand ST segments with approximately the same voltages).

The present invention's ST detection technique involves recording andprocessing baseline electrogram segments to calculate the threshold formyocardial infarction and/or ischemia detection. These baselineelectrogram segments would typically be collected, processed and storedonce an hour or with any other appropriate time interval. It isimportant to the function of the present invention that baselinesegments represent a “normal” electrogram for the patient's heart wherethe heart rate is in the “normal” range and the beats are not irregularnor do the exhibit excessive ST shift. During collection of baselinesegments, the present invention will assess if the segment selectedmeets the normalcy requirements. If it does not, the present inventionwill try to use the next collected electrogram segment as the baseline.If this too is not normal, the present invention will keep trying for apreset period of time to collect a baseline after which it will note theinability to collect a baseline, keep the previous baseline for futuredetection and wait for the next baseline collection time interval andtry to collect the next baseline. A very important feature of thepresent invention is the ability to identify the inability to collectany baselines over a specified time period and alert the patient to thisevent. This alert could indicate that the device is malfunctioning, thelead is no longer properly connected or the patient's heart is notproducing “normal” electrogram signals. For example, the patient's heartrate could be elevated over the specified time period due to thepatient's failure to take his beta blocker medication.

In addition to patient alerting, the reason for the inability to find abaseline may be stored in a “bad baseline” log.

If a suitable baseline for any particular time slot has not been changedover a selected time period due to a persistent inability to find a goodbaseline for that time slot, the baseline for that time slot may be setto a default value.

The present invention supports the capability to program the defaultbaseline values at any time.

Additionally, baseline updating may be turned off, such that the defaultbaseline values are always used as the baselines. This feature may behelpful in various situations, for example in the case where a person'sQRS complex is very irregular and/or frequently changes.

A preferred embodiment of the present invention would save and process a10 second baseline electrogram segment once every hour. Every 30 secondsthe cardiosaver would save and process a 10 second long recentelectrogram segment. The cardiosaver would compare the recentelectrogram segment with an average of the 24 most recent baselineelectrogram segments that were set hourly over the precedingapproximately 24 hour period.

The processing of each of the hourly baseline electrogram segments wouldinvolve calculating the average electrogram signal strength as well ascalculating the average “ST deviation”. The ST deviation for a singlebeat of an electrogram segment is defined to be the difference betweenthe average ST segment voltage and the average PQ segment voltage. Theaverage ST deviation of the baseline electrogram segment is the averageof the ST deviation of multiple (at least two) beats within the baselineelectrogram segment.

The following detailed description of the drawings fully describes howthe ST and PQ segments are measured and averaged.

An important aspect of the present invention is the capability to adjustthe location in time and duration of the ST and PQ segments used for thecalculation of ST shifts. The present invention is initially programmedwith the time interval between peak of the R wave of a beat and thestart of the PQ and ST segments of that beat set for the patient'snormal heart rate. As the patient's heart rate changes during dailyactivities, the present invention will adjust these time intervals foreach beat proportional to the R-R interval for that beat. In otherwords, if the R-R interval shortens (higher heart rate) then the ST andPQ segments would move closer to the R wave peak and would becomeshorter. ST and PQ segments of a beat within an electrogram segment aredefined herein as sub-segments of the electrogram segment. Specifically,the time interval between the R wave and the start of the ST and PQsegments may be adjusted in proportion to the R-R interval oralternately by the square root of the R-R interval. It is preferable inall cases to base these times on the R-R interval from the beat beforethe current beat. As calculating the square root is a processorintensive calculation, the preferred implementation of this feature isbest done by pre-calculating the values for the start of PQ and STsegments during programming and loading these times into a simple lookuptable where for each R-R interval, the start times and/or durations forthe segments is stored.

It is envisioned that a combination of linear and square root techniquescould be used where both the time interval between the R wave and thestart of the ST segment (T_(ST)) and the duration of the ST segment(D_(ST)) are proportional to the square root of the R-R interval, whilethe time interval between the R wave and the start of the PQ segment(T_(PQ)) and the duration of the PQ segment (D_(PQ)) are linearlyproportional to the R-R interval.

It is also envisioned that the patient would undergo a stress testfollowing implant, the electrogram data collected would be transmittedto the physician's programmer and the parameters T_(ST), D_(ST), T_(PQ)and D_(PQ) would be automatically selected by the programmer based onthe electrogram data from the stress test. The data from the stress testwould cover each of the heart rate ranges and could also be used by theprogrammer to generate excessive ST shift detection thresholds for eachof the heart rate ranges. In each heart rate range of the implant thedetection threshold would typically be set based on the mean andstandard deviation of the ST shifts seen during the stress test. Forexample, one could set the detection threshold for each heart rate rangeto the value of the mean ST shift plus or minus a multiple (e.g. three)times the standard deviation. In each case where the programmer canautomatically select parameters for the ST shift detection algorithm, amanual override would also be available to the medical practitioner.Such an override is of particular importance as it allows adjustment ofthe algorithm parameters to compensate for missed events or falsepositive detections.

The difference between the ST deviation on any single beat in a recentlycollected electrogram segment and a baseline average ST deviationextracted from a baseline electrogram segment is defined herein as the“ST shift” for that beat. The present invention envisions that detectionof acute myocardial infarction and/or ischemia would be based oncomparing the ST shift of one or more beats with a predetermineddetection threshold “H_(ST)”.

In U.S. application Ser. No 10/051,743 that is incorporated herein byreference, Fischell describes a fixed threshold for detection that isprogrammed by the patient's doctor. The present invention envisions thatthe threshold should rather be based on some percentage “P_(ST)” of theaverage signal strength extracted from the baseline electrogram segmentwhere P_(ST) is a programmable parameter of the cardiosaver device. The“signal strength” can be measured as peak-to-peak signal voltage, RMSsignal voltage or as some other indication of signal strength such asthe difference between the average PQ segment amplitude and the peak Rwave amplitude.

Similarly, it is envisioned that the value of P_(ST) might be adjustedas a function of heart rate so that a higher threshold could be used ifthe heart rate is elevated, so as to not trigger on exercise that insome patients will cause minor ST segment shifts when there is not aheart attack occurring. Alternately, lower thresholds might be used withhigher heart rates to enhance sensitivity to detect exercise-inducedischemia. One embodiment of the present invention has a table stored inmemory where values of P_(ST) for a preset number of heart rate ranges,(e.g. 50-80, 81-90, 91-100, 101-120, 121-140) might be stored for use bythe cardiosaver detection algorithm in determining if an acutemyocardial infarction or exercise induced ischemia is present.

Thus it is envisioned that the present invention would use the baselineelectrogram segments in 3 ways.

-   -   1. To calculate a baseline average value of a feature such as ST        segment voltage or ST deviation that is then subtracted from the        value of the same feature in recently captured electrogram        segments to calculate the shift in the value of that feature.        E.g. the baseline average ST deviation is subtracted from the        amplitude of the ST deviation on each beat in a recently        captured electrogram segment to yield the ST shift for that        beat.    -   2. To provide an average signal strength used in calculating the        threshold for detection of a cardiac event. This will improve        detection by compensating for slow changes in electrogram signal        strength over relatively long periods of time.    -   3. To provide a medical practitioner with information that will        facilitate diagnosis of the patient's condition. For example,        the baseline electrogram segment may be transmitted to a        remotely located medical practitioner and/or displayed directly        to a medical practitioner in the emergency room.

For the purposes of the present invention, the term adaptive detectionalgorithm is hereby defined as a detection algorithm for a cardiac eventwhere at least one detection-related threshold adapts over time so as tocompensate for relatively slow (longer than an hour) changes in thepatient's normal electrogram.

The present invention might also include an accelerometer built into thecardiosaver where the accelerometer is an activity sensor used todiscriminate between elevated heart rate resulting from patient activityas compared to other causes.

It is also envisioned that the present invention could have specificprogramming to identify a very low heart rate (bradycardia) or a veryhigh heart rate (tachycardia or fibrillation). While a very low heartrate is usually not of immediate danger to the patient, its persistencecould indicate the need for a pacemaker. As a result, the presentinvention could use the “SEE DOCTOR” alert along with an optionalmessage sent to the external alarm system to alert the patient that hisheart rate is too low and that he should see his doctor as soon asconvenient. On the other hand, a very high heart rate can signalimmediate danger thus it would be desirable to initiate an EMERGENCY ina manner similar to that of acute myocardial infarction detection. Whatis more, detections of excessive ST shift during high heart rates may bedifficult and if the high heart rate is the result of a heart attackthen it is envisioned that the programming of the present inventionwould use a major event counter that would turn on the alarm if thedevice detects a combination of excessive ST shift and overly high heartrate.

Another early indication of acute myocardial infarction is a rapidchange in the morphology of the T wave. Unfortunately, there are manynon-AMI causes of changes in the morphology of a T wave. However, thesechanges typically occur slowly while the changes from an AMI occurrapidly. Therefore one embodiment of this invention uses detection of achange in the T wave as compared to a baseline collected a short time(less than 30 minutes) in the past. The best embodiment is probablyusing a baseline collected between 1 and 5 minutes in the past. Such a Twave detector could look at the amplitude of the peak of the T wave. Analternate embodiment of the T wave detector might look at the averagevalue of the entire T wave as compared to the baseline. The thresholdfor T wave shift detection, like that of ST shift detection, can be apercentage PT of the average signal strength of the baseline electrogramsegment. PT could differ from P_(ST) if both detectors are usedsimultaneously by the cardiosaver.

In its simplest form, the “guardian system” includes only thecardiosaver and a physician's programmer. Although the cardiosaver couldfunction without an external alarm system where the internal alarmsignal stays on for a preset period of time, the external alarm systemis highly desirable. One reason it is desirable is the button on theexternal alarm system that provides the means for of turning off thealarm in either or both the implanted device (cardiosaver) and theexternal alarm system. Another very important function of the externalalarm system is to facilitate display of both the baseline and alarmelectrogram segments to a treating physician to facilitate rapiddiagnosis and treatment for the patient.

As an implantable device, the present invention cardiosaver mustconserve power to allow a reasonable lifetime in a cosmeticallyacceptable package size. In U.S. Pat. No. 6,609,023, Fischell et aldescribe how the cardiosaver collects and processes electrogram data fora first predetermined, “segment time period” (e.g. 10 seconds) to lookfor a cardiac event and then going to a lower power usage sleep statefor a second predetermined “sleep state time period” (e.g. 20 seconds).Although it is desirable to look for cardiac events every 30 seconds asdescribed by Fischell et al, it is possible to decrease the use ofelectrical power by extending the time duration of the sleep state timeperiod to be greater than 20 seconds. Extending implant lifetime bydecreasing electrical power usage can be accomplished by utilizing alonger time duration for the sleep state time period to be (for example)on the order of 50 to 80 seconds.

While a 50 to 80 sleep state time period with a 10 second time durationfor the segment time period of data collection would increase the lifeof the implant, the total cycle times of 60 to 90 seconds is acomparatively long time to wait if cardiac events are to be quicklydetected. The present invention cardiosaver utilizes an adaptive cycletime where the sleep state time period following detection of an“abnormal” electrogram segment is shorter than the sleep state timeperiod following detection of an electrogram segment that has nodetected abnormality. For example, the sleep state time period could be80 seconds following an electrogram segment where no abnormality isdetected and 20 seconds following an electrogram segment where anyabnormality (e.g. excessive ST shift or arrhythmia) is detected. In thisway, the function during any irregularity of heart signal would be thesame as the Fischell et al. cardiosaver, yet significant power savingswould be created during normal functioning of the heart.

It is also envisioned that the sleep state time period could be evenmore adaptive so that the length of the sleep state time might berelated to the number of successive normal (no abnormality detected)electrogram segments. For example, one normal segment would be followedby a sleep state time period of 40 seconds, two normal segments by 50seconds, 3 normal segments by 80 seconds, and 4 or more normal segmentsby 110 seconds. There would typically be a maximum sleep state timeperiod used during long periods when all electrogram segments are normaland a minimum sleep time period that would be used following anydetected abnormality. The maximum and minimum sleep times could bepreset or programmable.

An abnormal electrogram segment is an electrogram segment where one ormore heart signal parameters extracted during the processing of theelectrogram segment by the cardiosaver meets the criteria for anabnormal electrogram segment. The criteria for an abnormal electrogramsegment can be the same criteria used for detecting a cardiac eventwithin the electrogram segment. It is also envisioned that the criteriafor detecting an abnormal electrogram segment could be less stringentthat the criteria for detecting a cardiac event. For example, anabnormal segment might be detected using a threshold lower by a presetpercentage (e.g. 50%) than the respective threshold for the indicationof a cardiac event. In this way, the time to detection of the eventmight be reduced by getting to the shorter sleep time more quickly.

It is also highly desirable for the present invention guardian system toallow real time or near real time display of electrogram data fordiagnostic purposes. Such a display could be of great value in anemergency setting where fast review of the patient's current heartsignal is important. In a real time mode, the cardiosaver 5 of FIG. 1would simultaneously collect and transmit electrogram data to theexternal equipment 7 of FIG. 1.

In the near real time mode, the cardiosaver 5 would collect anelectrogram segment, process the electrogram segment looking forabnormalities and then transmit the segment to the external equipment 7.A typical cycle time for the near real time mode would be 15 secondsincluding 10 seconds for electrogram segment collection, 1 second forprocessing and 4 seconds for transmission to the external equipment 7.The results of the processing might also be transmitted along with thesegment.

It may be very important to differentiate positive ST shifts (elevation)of the electrogram from negative ST shifts (depression) and alsoseparately differentiate these conditions based on heart rate. In fact,there are four separate detectable conditions as follows:

-   -   1. Excessive ST elevation at normal heart rate    -   2. Excessive ST depression at normal heart rate    -   3. Excessive ST elevation at elevated heart rate    -   4. Excessive ST depression at elevated heart rate

While ST depression at elevated heart rate is the well known indicationof sub-endocardial ischemia and ST elevation at normal heart rate istypically an indication of transmural ischemia it is not as clear as tothe cause of excessive ST depression at normal heart rate or excessiveST elevation at an elevated heart rate. For example, excessive STdepression at normal heart rate could be the result of sub-endocardialischemia from a partial occlusion of a coronary artery or it could bethe result of transmural ischemia from a total occlusion (this issometimes referred to as upside down ST elevation). It is also possiblethat an excessive ST shift at normal heart rates can be seen in the 10minute period following an interval of elevated heart rate. Astransmural ischemia is a much more dangerous condition, and one shouldnot send a patient to the emergency room if the patient's condition isnot a dangerous one, it is important to be able to have techniques inthe present invention ST shift algorithm to allow the algorithm toproperly classify the cardiac event in any of the above 4 conditions.

The present invention ST shift algorithm does this in several ways.First, the detection thresholds for all 4 conditions are separatelyprogrammable so that one could have a larger shift threshold forconditions 2, 3 or 4 than that of condition 1. Next one can require adifferent ST shift duration or persistence time for the differentconditions. For example, excessive ST elevation at normal heart ratemight only require 2 minutes of ST shift duration while excessive STdepression at elevated heart rate could require 15 minutes of ST shiftduration for an event detection. Finally, to properly classify excessiveST shifts at normal heart rate the algorithm could extend any period ofelevated heart rate by a time window that would classify any ST shift inthe window as being at an elevated heart rate, even if the heart ratedrops into a normal range.

Thus it is an object of this invention is to have a cardiosaver designedto detect the occurrence of a cardiac event by comparing baselineelectrogram data from a first predetermined time with recent electrogramdata from a second predetermined time.

Another object of the present invention is to have a Guardian systemwhere the electrogram data collected during a preset period (such asduring a stress test) is used by the programmer to automatically selectdetection parameters for the ST shift detection algorithm.

Another object of the present invention is to have a Guardian systemwith at least two levels of severity of patient alarm/alerting where themore severe EMERGENCY alarm alerts the patient to seek immediate medicalattention.

Another object of the present invention is to have a cardiac eventdetected by comparing at least one heart signal parameter extracted froman electrogram segment captured at a first predetermined time by animplantable cardiosaver with the same at least one heart signalparameter extracted from an electrogram segment captured at a secondpredetermined time.

Another object of the present invention is to have acute myocardialinfarction detected by comparing recent electrogram data to an averageof baseline electrogram data that is collected periodically (e.g. oncean hour) over a certain amount of time (e.g. one day). A related objectof this invention is to create a plurality of baseline time slots (e.g.24 time slots for an hourly period over one day) for which correspondingbaseline electrogram data is stored.

Another object of the present invention is to have acute myocardialinfarction detected by comparing the ST deviation of the beats in arecently collected electrogram segment to the average ST deviation oftwo or more beats of a baseline electrogram segment.

Another object of the present invention is to have acute myocardialinfarction detected by comparing the ST segment voltage of the beats ina recently collected electrogram segment to the average ST segmentvoltage of two or more beats of a baseline electrogram segment.

Another object of the present invention is to have the threshold(s) fordetecting the occurrence of a cardiac event adjusted by a cardiosaverdevice to compensate for slow changes in the average signal level of thepatient's electrogram.

Another object of the present invention is to have the threshold fordetection of a cardiac event adjusted by a cardiosaver device tocompensate for daily cyclic changes in the average signal level of thepatient's electrogram.

Another object of the present invention is to have an external alarmsystem including an alarm off button that will turn off either or bothinternal and external alarm signals initiated by an implantedcardiosaver.

Another object of the present invention is to have the alarm signalgenerated by a cardiosaver automatically turn off after a preset periodof time.

Still another object of this invention is to use the cardiosaver to warnthe patient that an acute myocardial infarction has occurred by means ofa subcutaneous vibration.

Still another object of this invention is to have the cardiac eventdetection require that at least a majority of the beats exhibit anexcessive ST shift before identifying an acute myocardial infarction.

Still another object of this invention is to have the cardiac eventdetection require that excessive ST shift still be present in at leasttwo electrogram segments separated by a preset period of time.

Still another object of this invention is to have the cardiac eventdetection require that excessive ST shift still be present in at leastthree electrogram segments separated by preset periods of time.

Yet another object of the present invention is to have a threshold fordetection of excessive ST shift that is dependent upon the averagesignal strength calculated from a baseline electrogram segment.

Yet another object of the present invention is to have a threshold fordetection of excessive ST shift that is a function of the differencebetween the average PQ segment amplitude and the R wave peak amplitudeof a baseline electrogram segment.

Yet another object of the present invention is to have a threshold fordetection of excessive ST shift that is a function of the averageminimum to maximum (peak-to-peak) voltage for at least two beatscalculated from a baseline electrogram segment.

Yet another object of the present invention is to have the ability todetect a cardiac event by the shift in the amplitude of the T wave of anelectrogram segment at a second predetermined time as compared with theaverage baseline T wave amplitude from a baseline electrogram segment ata first predetermined time.

Yet another object of the present invention is to have the ability todetect a cardiac event by the shift in the T wave deviation of at leastone beat of an electrogram segment at a second predetermined time ascompared with the average baseline T wave deviation from an electrogramsegment at a first predetermined time.

Yet another object of the present invention is to have the first andsecond predetermined times for T wave amplitude and/or deviationcomparison be separated by less than 30 minutes.

Yet another object of the present invention is to have the baselineelectrogram segment used for ST segment shift detection and the baselineelectrogram segment used for T wave shift detection be collected atdifferent times.

Yet another object of the present invention is to have an initialalarm-on patient alerting period followed by a reminder alarm thatperiodically cycles on and off over a periodic reminder alarm period.

Yet another object of the present invention is to have an individualized(patient specific) “normal” heart rate range such that the upper andlower limits of “normal” are programmable using the cardiosaverprogrammer.

Yet another object of the present invention is to have one or moreindividualized (patient specific) “elevated” heart rate ranges such thatthe upper and lower limits of each “elevated” range are programmableusing the cardiosaver programmer.

Yet another object of the present invention is to allow the thresholdfor detection of an excessive ST shift be different for the “normal”heart rate range as compared to one or more “elevated” heart rateranges.

Yet another object of the present invention is to allow real time ornear real time display of electrogram data for diagnostic purposes.

Yet another object of the present invention is to have the time periodbetween collections of electrogram data vary, where the time period islengthened when the electrogram is normal and shortened when theelectrogram is abnormal.

Yet another object of the present invention is to have differentcriteria for the normal/abnormal electrogram decision that influencesthe time period between collections of electrogram data as compared withthe criteria for detecting a cardiac event.

Yet another object of the present invention is to be able to identifythe inability to collect a normal baseline electrogram segment over abaseline alert time period and if so identified, use the alertingcapabilities of the present invention to alert the patient to seekmedical attention.

Yet another object of the present invention is to be able to identifythe inability to collect a normal baseline electrogram segment for aparticular baseline time slot and if so, use a preselected baselineelectrogram for that time slot.

Yet another object of the present invention is to detect.

These and other objects and advantages of this invention will becomeobvious to a person of ordinary skill in this art upon reading of thedetailed description of this invention including the associated drawingsas presented herein.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a guardian system for the detection of a cardiacevent and for warning the patient that a cardiac event is occurring.

FIG. 2 illustrates a normal electrogram pattern and also shows asuperimposed elevated ST segment that would be indicative of an acutemyocardial infarction.

FIG. 3 is a plan view of the cardiosaver showing the cardiosaverelectronics module and two electrical leads each having one electrode.

FIG. 4 is a block diagram of the cardiosaver.

FIG. 5 is a block diagram of the cardiosaver event detection program.

FIG. 6 illustrates the extracted electrogram segment features used tocalculate ST shift.

FIG. 7. is a block diagram of the hourly routine of the cardiosaverevent detection program.

FIG. 8 is a block diagram of the alarm subroutine of the cardiosaverevent detection program.

FIG. 9 is a block diagram of the data segment characterizationsubroutine of the cardiosaver event detection program.

FIG. 1O is a block diagram of the ST shift subroutine of the cardiosaverevent detection program.

FIG. 11 diagrams the alarm conditions that are examples of thecombinations of major and minor events that can trigger an internalalarm signal (and/or external alarm signal) for the guardian system ofFIG. 1.

FIG. 12 is a block diagram of the baseline parameter extractionsubroutine of the cardiosaver event detection program.

FIG. 13 is block diagram of the R wave peak detection subroutine of thecardiosaver event detection program.

FIG. 14 is an alternate embodiment of the guardian system.

FIG. 15 illustrates the preferred physical embodiment of the externalalarm transceiver.

FIG. 16 illustrates the physical embodiment of the combined externalalarm transceiver and pocket PC.

FIG. 17 shows an advanced embodiment of the external alarm transceiver.

FIG. 18 is an alternate scheme for detecting ST shift related conditionsthat may be used in conjunction the cardiosaver event detection programshown in FIG. 5.

FIG. 19 is yet an alternate scheme for detecting ST shift relatedconditions that may be used in conjunction the cardiosaver eventdetection program shown in FIG. 5.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 illustrates one embodiment of the guardian system 10 consistingof an implanted cardiosaver 5 and external equipment 7. The batterypowered cardiosaver 5 contains electronic circuitry that can detect acardiac event such as an acute myocardial infarction or arrhythmia andwarn the patient when the event occurs. The cardiosaver 5 can store thepatient's electrogram for later readout and can send wireless signals 53to and receive wireless signals 54 from the external equipment 7. Thefunctioning of the cardiosaver 5 will be explained in greater detailwith the assistance of FIG. 4.

The cardiosaver 5 has two leads 12 and 15 that have multi-wireelectrical conductors with surrounding insulation. The lead 12 is shownwith two electrodes 13 and 14. The lead 15 has subcutaneous electrodes16 and 17. In fact, the cardiosaver 5 could utilize as few as one leador as many as three and each lead could have as few as one electrode oras many as eight electrodes. Furthermore, electrodes 8 and 9 could beplaced on the outer surface of the cardiosaver 5 without any wires beingplaced externally to the cardiosaver 5.

The lead 12 in FIG. 1 could advantageously be placed through thepatient's vascular system with the electrode 14 being placed into theapex of the right ventricle. The lead 12 with electrode 13 could beplaced in the right ventricle or right atrium or the superior vena cavasimilar to the placement of leads for pacemakers and ImplantableCoronary Defibrillators (ICDs). The metal case 11 of the cardiosaver 5could serve as an indifferent electrode with either or both electrodes13 and/or 14 being active electrodes. It is also conceived that theelectrodes 13 and 14 could be used as bipolar electrodes. Alternately,the lead 12 in FIG. 1 could advantageously be placed through thepatient's vascular system with the electrode 14 being placed into theapex of the left ventricle. The electrode 13 could be placed in the leftatrium.

The lead 15 could advantageously be placed subcutaneously at anylocation where the electrodes 16 and/or 17 would provide a goodelectrogram signal indicative of the electrical activity of the heart.Again for this lead 15, the case 11 of the cardiosaver 5 could be anindifferent electrode and the electrodes 16 and/or 17 could be activeelectrodes or electrodes 16 and 17 could function together as bipolarelectrodes. The cardiosaver 5 could operate with only one lead and asfew as one active electrode with the case of the cardiosaver 5 being anindifferent electrode. The guardian system 10 described herein canreadily operate with only two electrodes.

One embodiment of the cardiosaver device 5 using subcutaneous lead 15would have the electrode 17 located under the skin on the patient's leftside. This could be best located between 2 and 20 inches below thepatient's left arm pit. The cardiosaver case 11 could act as theindifferent electrode and would typically be implanted under the skin onthe left side of the patient's chest.

FIG. 1 also shows the external equipment 7 that consists of aphysician's programmer 68 having an antenna 70, an external alarm system60 including a charger 166. The external equipment 7 provides means tointeract with the cardiosaver 5. These interactions include programmingthe cardiosaver 5, retrieving data collected by the cardiosaver 5 andhandling alarms generated by the cardiosaver 5.

The purpose of the physician's programmer 68 shown in FIG. 1 is to setand/or change the operating parameters of the implantable cardiosaver 5and to read out data stored in the memory of the cardiosaver 5 such asstored electrogram segments. This would be accomplished by transmissionof a wireless signal 54 from the programmer 68 to the cardiosaver 5 andreceiving of telemetry by the wireless signal 53 from the cardiosaver 5to the programmer 68. When a laptop computer is used as the physician'sprogrammer 68, it would require connection to a wireless transceiver forcommunicating with the cardiosaver 5. Such a transceiver could beconnected via a standard interface such as a USB, serial or parallelport or it could be inserted into the laptop's PCMCIA card slot. Thescreen on the laptop would be used to provide guidance to the physicianin communicating with the cardiosaver 5. Also, the screen could be usedto display both real time and stored electrograms that are read out fromthe cardiosaver 5.

In FIG. 1, the external alarm system 60 has a patient operated initiator55, an alarm disable button 59, a panic button 52, an alarm transceiver56, an alarm speaker 57 and an antenna 161 and can communicate withemergency medical services 67 with the modem 165 via the communicationlink 65.

If a cardiac event is detected by the cardiosaver 5, an alarm message issent by a wireless signal 53 to the alarm transceiver 56 via the antenna161. When the alarm is received by the alarm transceiver 56 a signal 58is sent to the loudspeaker 57. The signal 58 will cause the loudspeakerto emit an external alarm signal 51 to warn the patient that an eventhas occurred. Examples of external alarm signals 51 include a periodicbuzzing, a sequence of tones and/or a speech message that instructs thepatient as to what actions should be taken. Furthermore, the alarmtransceiver 56 can, depending upon the nature of the signal 53, send anoutgoing signal over the link 65 to contact emergency medical services67. When the detection of an acute myocardial infarction is the cause ofthe alarm, the alarm transceiver 56 could automatically notify emergencymedical services 67 that a heart attack has occurred and an ambulancecould be sent to treat the patient and to bring him to a hospitalemergency room.

If the remote communication with emergency medical services 67 isenabled and a cardiac event alarm is sent within the signal 53, themodem 165 will establish the data communications link 65 over which amessage will be transmitted to the emergency medical services 67. Themessage sent over the link 65 may include any or all of the followinginformation: (1) a specific patient is having an acute myocardialinfarction or other cardiac event, (2) the patient's name, address and abrief medical history, (3) a map and/or directions to where the patientis located, (4) the patient's stored electrogram including baselineelectrogram data and the specific electrogram segment that generated thealarm (5) continuous real time electrogram data, and (6) a prescriptionwritten by the patient's personal physician as to the type and amount ofdrug to be administered to the patient in the event of a heart attack.If the emergency medical services 67 includes an emergency room at ahospital, information can be transmitted that the patient has had acardiac event and should be on his way to the emergency room. In thismanner the medical practitioners at the emergency room could be preparedfor the patient's arrival.

The communications link 65 can be either a wired or wireless telephoneconnection that allows the alarm transceiver 56 to call out to emergencymedical services 67. The typical external alarm system 60 might be builtinto a Pocket PC or Palm Pilot PDA where the alarm transceiver 56 andmodem 165 are built into insertable cards having a standardizedinterface such as compact flash cards, PCMCIA cards, multimedia, memorystick or secure digital (SD) cards. The modem 165 can be a wirelessmodem such as the Sierra AirCard 300 or the modem 165 may be a wiredmodem that connects to a standard telephone line. The modem 165 can alsobe integrated into the alarm transceiver 56.

The purpose of the patient operated initiator 55 is to give the patientthe capability for initiating transmission of the most recently capturedelectrogram segment from the cardiosaver 5 to the external alarm system60. This will enable the electrogram segment to be displayed for amedical practitioner.

Once an internal and/or external alarm signal has been initiated,depressing the alarm disable button 59 will acknowledge the patient'sawareness of the alarm and turn off the internal alarm signal generatedwithin the cardiosaver 5 and/or the external alarm signal 51 playedthrough the speaker 57. If the alarm disable button 59 is not used bythe patient to indicate acknowledgement of awareness of a SEE DOCTORalert or an EMERGENCY alarm, it is envisioned that the internal and/orexternal alarm signals would stop after a first time period (an initialalarm-on period) that would be programmable through the programmer 68.

For EMERGENCY alarms, to help prevent a patient ignoring or sleepingthrough the alarm signals generated during the initial alarm-on period,a reminder alarm signal might be turned on periodically during afollow-on periodic reminder time period. This periodic reminder time istypically much longer than the initial alarm-on period. The periodicreminder time period would typically be 3 to 5 hours because after 3 to5 hours the patient's advantage in being alerted to seek medicalattention for a severe cardiac event like an AMI is mostly lost. It isalso envisioned that the periodic reminder time period could also beprogrammable through the programmer 68 to be as short as 5 minutes oreven continue indefinitely until the patient acknowledges the alarmsignal with the button 59 or the programmer 68 is used to interact withthe cardiosaver 5.

Following the initial alarm on-period there would be an alarm off-periodfollowed by a reminder alarm on-period followed by an alarm off-periodfollowed by another reminder alarm on-period and so on periodicallyrepeating until the end of the periodic reminder time period.

The alarm off-period time interval between the periodic reminders mightalso increase over the reminder alarm on-period. For example, theinitial alarm-on period might be 5 minutes and for the first hourfollowing the initial alarm-on period, a reminder signal might beactivated for 30 seconds every 5 minutes. For the second hour thereminder alarm signal might be activated for 20 seconds every 10 minutesand for the remaining hours of the periodic reminder on-period thereminder alarm signal might be activated for 30 seconds every 15minutes.

The patient might press the panic button 52 in the event that thepatient feels that he is experiencing a cardiac event. The panic button52 will initiate the transmission from the cardiosaver 5 to the externalalarm system 60 via the wireless signal 53 of both recent and baselineelectrogram segments. The external alarm system 60 will then retransmitthese data via the link 65 to emergency medical services 67 where amedical practitioner will view the electrogram data. The remote medicalpractitioner could then analyze the electrogram data and call thepatient back to offer advice as to whether this is an emergencysituation or the situation could be routinely handled by the patient'spersonal physician at some later time.

It is envisioned that there may be preset limits within the externalalarm system 60 that prevent the patient operated initiator 55 and/orpanic button from being used more than a certain number of times a dayto prevent the patient from running down the batteries in thecardiosaver 5 and external alarm system 60 as wireless transmissiontakes a relatively large amount of power as compared with otherfunctional operation of these devices.

FIG. 2 illustrates a typical electrogram signal having beats I and 2from some pair of implanted electrodes such as the electrode 14 and thecase 11 of FIG. 3 overlaid with an electrogram having an elevated STsegment 4 (dashed line). The various portions of the electrogram areshown as the P, Q, R, S, and T waves. These are all shown as portions ofa solid line in FIG. 2. The normal ST segment 3 of beat 2 is also shownin FIG. 2. The R-R interval 5 for beat 2 is shown as the time betweenthe R waves of beat 2 and the beat before it (beat 1).

When an acute myocardial infarction occurs, there is typically anelevation (or depression) of the ST segment 4 as shown by the dashedline in FIG. 2. It is this shift of the ST segment 4 as compared to thebaseline ST segment 3 that is a clear indicator that an acute myocardialinfarction has occurred in a significant portion of the patient'smyocardium.

Although an elevated ST segment 4 can be a good indicator of an acutemyocardial infarction, other indicators such as a sudden change of heartrate or heart wall motion, intra-coronary blood pressure or a suddendecrease in blood PO₂ could also be used as independent sensing means orthose signals could be used in addition to the voltage shift of the STsegment 4.

It is important to note that the electrogram from implanted electrodesmay provide a faster detection of an ST segment shift as compared to anelectrocardiogram signal obtained from skin surface electrodes. Thus theelectrogram from implanted electrodes as described herein is thepreferred embodiment of the present invention.

It is also well known that the T wave can shift very quickly when aheart attack occurs. It is envisioned that the present invention mightdetect this T wave shift as compared to a time of 1 to 5 minutes in thepast.

It is anticipated that when a patient who has a stenosis in a coronaryartery is performing a comparatively strenuous exercise his heart rateincreases and he can develop exercise induced ischemia that will alsoresult in a shift of the ST segment of his electrogram. This isparticularly true for patients who have undergone balloon angioplastywith or without stent implantation. Such patients will be informed bytheir own physician that, if their cardiosaver 5 of FIG. 1 activates analarm during exercise, that it may be indicative of the progression ofan arterial stenosis in one of the heart's arteries. Such a patientwould be advised to stop all exertion immediately and if the alarmsignal goes away as his heart rate slows, the patient should see hisdoctor as soon as convenient. If the alarm signal does not go away asthe patient's heart rate slows down into the normal range then thecardiosaver will change the alarm signal to indicate that the patientshould immediately seek medical care. As previously described, thecardiosaver 5 could emit a different signal if there is a heart attackas compared to the signal that would be produced if there were ischemiaresulting from exercise.

It is also envisioned that heart rate and the rate of change of heartrate experienced during an ST segment voltage shift can be used toindicate which alarm should be produced by the cardiosaver 5.Specifically, an ST segment shift at a near normal heart rate wouldindicate an acute myocardial infarction. An ST segment shift when thereis an elevated heart rate (e.g., greater than 100 bpm) would generallybe indicative of a progressing stenosis in a coronary artery. In anycase, if a sufficient ST segment shift occurs that results in an alarmfrom the cardiosaver 5, the patient should promptly seek medical care todetermine the cause of the alarm.

It should be understood that, depending on a patient's medicalcondition, a vigorous exercise might be as energetic as running a longdistance or merely going up a flight of stairs. After the cardiosaver 5is implanted in a patient who has undergone a stent implant, he shouldhave a stress test to determine his level of ST segment shift that isassociated with the highest level of exercise that he can attain. Thepatient's heart rate should then be noted and the cardiosaver thresholdsfor detection, described with FIGS. 5 through 10, should be programmedso as to not alarm at ST segment shifts observed during exercise. Thenif at a later time the patient experiences an increased shift of his STsegment at that pre-determined heart rate or within a heart rate range,then an alarm indicating ischemia can be programmed to occur. Theoccurrence of such an alarm can indicate that there is a progression inthe narrowing of some coronary artery that may require angiography todetermine if angioplasty, possibly including stent implantation, isrequired.

The alarm signal associated with an excessive ST shift caused by anacute myocardial infarction can be quite different from the “SEE DOCTOR”alarm means associated with progressing ischemia during exercise. Forexample, the SEE DOCTOR alert signal might be an audio signal thatoccurs once every 5 to 10 seconds. A different alarm signal, for examplean audio signal that is three buzzes every 3 to 5 seconds, may be usedto indicate a major cardiac event such as an acute myocardialinfarction. Similar alarm signal timing would typically be used for bothinternal alarm signals generated by the alarm sub-system 48 of FIG. 4and external alarm signals generated by the external alarm system 60.

In any case, a patient can be taught to recognize which signal occursfor these different circumstances so that he can take immediate responseif an acute myocardial infarction is indicated but can take anon-emergency response if progression of the narrowing of a stenosis orsome other less critical condition is indicated. It should be understoodthat other distinctly different audio alarm patterns could be used fordifferent arrhythmias such as atrial fibrillation, atrial flutter,PVC's, PAC's, etc. A capability of the physician's programmer 68 of FIG.1 would be to program different alarm signal patterns, enable or disabledetection and/or generation of associated alarm signals in thecardiosaver for any one or more of these various cardiac events. Also,the intensity of the audio alarm, vibration or electrical tickle alarmcould be adjusted to suit the needs of different patients. In order tofamiliarize the patient with the different alarm signals, the programmer68 of the present invention would have the capability to turn each ofthe different alarm signals on and off.

FIG. 3 is a plan view of the cardiosaver 5 having a case 11 and aplastic header 20. The case 11 contains the primary battery 22 and theelectronics module 18. This type of package is well known forpacemakers, implantable defibrillators and implantable tissuestimulators. Electrical conductors placed through the plastic header 20connect the electronics module 18 to the electrical leads 12 and 15,which have respectively electrodes 14 and 17. The on-case electrodes 8and 9 of FIG. 1 are not shown in FIG. 3. It should also be understoodthat the cardiosaver 5 can function with only two electrodes, one ofwhich could be the case 11. All the different configurations forelectrodes shown in FIGS. 1 and 3, such as the electrodes 8, 9, 13, 14,16 or the metal case 11 are shown only to indicate that there are avariety of possible electrode arrangements that can be used with thecardiosaver 5.

On the metal case 11, a conducting disc 31 mounted onto an insulatingdisc 32 can be used to provide a subcutaneous electrical tickle to warnthe patient that an acute myocardial infarction is occurring or to actas an independent electrode.

FIG. 4 is a block diagram of the cardiosaver 5 with primary battery 22and a secondary battery 24. The secondary battery 24 is typically arechargeable battery of smaller capacity but higher current or voltageoutput than the primary battery 22 and is used for short term highoutput components of the cardiosaver 5 like the RF chipset in thetelemetry sub-system 46 or the vibrator 25 attached to the alarmsub-system 48. An important feature of the present invention cardiosaveris the dual battery configuration where the primary battery 22 willcharge the secondary battery 24 through the charging circuit 23. Theprimary battery 22 is typically a larger capacity battery than thesecondary battery 24. The primary battery also typically has a lowerself discharge rate as a percentage of its capacity than the secondarybattery 24. It is also envisioned that the secondary battery could becharged from an external induction coil by the patient or by the doctorduring a periodic check-up.

The electrodes 14 and 17 connect with wires 12 and 15 respectively tothe amplifier 36 that is also connected to the case 11 acting as anindifferent electrode. As two or more electrodes 12 and 15 are shownhere, the amplifier 36 would be a multi-channel amplifier. The amplifiedelectrogram signals 37 from the amplifier 36 are then converted todigital signals 38 by the analog-to-digital converter 41. The digitalelectrogram signals 38 are buffered in the First-In-First-Out (FIFO)memory 42. Processor means shown in FIG. 4 as the central processingunit (CPU) 44 coupled to memory means shown in FIG. 4 as the RandomAccess Memory (RAM) 47 can process the digital electrogram data 38stored the FIFO 42 according to the programming instructions stored inthe program memory 45. This programming (i.e. software) enables thecardiosaver 5 to detect the occurrence of a cardiac event such as anacute myocardial infarction.

A clock/timing sub-system 49 provides the means for timing specificactivities of the cardiosaver 5 including the absolute or relative timestamping of detected cardiac events. The clock/timing sub-system 49 canalso facilitate power savings by causing components of the cardiosaver 5to go into a low power standby mode in between times for electrogramsignal collection and processing. Such cycled power savings techniquesare often used in implantable pacemakers and defibrillators. In analternate embodiment, the clock/timing sub-system can be provided by aprogram subroutine run by the central processing unit 44.

In an advanced embodiment of the present invention, the clock/timingcircuitry 49 would count for a first period (e.g. 20 seconds) then itwould enable the analog-to-digital converter 41 and FIFO 42 to beginstoring data, after a second period (e.g. 10 seconds) the timingcircuitry 49 would wake up the CPU 44 from its low power standby mode.The CPU 44 would then process the 10 seconds of data in a very shorttime (typically less than a second) and go back to low power mode. Thiswould allow an on off duty cycle of the CPU 44 which often draws themost power of less than 2 seconds per minute while actually collectingelectrogram data for 20 seconds per minute.

In a preferred embodiment of the present invention the RAM 47 includesspecific memory locations for 4 sets of electrogram segment storage.These are the recent electrogram storage 472 that would store the last 2to 10 minutes of recently recorded electrogram segments so that theelectrogram data leading in the period just before the onset of acardiac event can be reviewed at a later time by the patient's physicianusing the physician's programmer 68 of FIG. 1. For example, the recentelectrogram storage 472 might contain eight 10 second long electrogramsegments that were captured every 30 seconds over the last 4 minutes.

The baseline electrogram memory 474 would provide storage for baselineelectrogram segments collected at preset times over one or more days.For example, the baseline electrogram memory 474 might contain 24baseline electrogram segments of 10 seconds duration, one from each hourfor the last day, and information abstracted from these baselines.

A long term electrogram memory 477 would provide storage forelectrograms collected over a relatively long period of time. In thepreferred embodiment, every ninth electrogram segment that is acquiredis stored in a circular buffer, so that the oldest electrogram segmentsare overwritten by the newest one.

The event memory 476 occupies the largest part of the RAM 47. The eventmemory 476 is not overwritten on a regular schedule as are the recentelectrogram memory 472 and baseline electrogram memory 474 but istypically maintained until read out by the patient's physician with theprogrammer 68 of FIG. 1. At the time a cardiac event like excessive STshift indicating an acute myocardial infarction is detected by the CPU44, all (or part) of the entire contents of the baseline and recentelectrogram memories 472 and 474 would typically be copied into theevent memory 476 so as to save the pre-event data for later physicianreview.

In the absence of events, the event memory 476 could be used temporarilyto extend the recent electrogram memory 472 so that more data (e.g.every 10 minutes for the last 12 hours) could be held by the cardiosaver5 of FIG. 1 to be examined by a medical practitioner at the time apatient visits. This would typically be overwritten with pre- andpost-event electrogram segments following a detected event.

An example of use of the event memory 476 would have a SEE DOCTOR alertsaving the last segment that triggered the alarm and the baseline usedby the detection algorithm in detecting the abnormality. An EMERGENCYALARM would save the sequential segments that triggered the alarm, aselection of other pre-event electrogram segments, or a selection of the24 baseline electrogram segments and post-event electrogram segments.For example, the pre-event memory would have baselines from −24 hrs,−18, −12, −6, −5, −4, −3, −2 and −1 hours, recent electrogram segments(other than the triggering segments) from −5 minutes, −10, −20, −35, and−50 minutes, and post-event electrogram segments for every 5 minutes forthe 2 hours following the event and for every 15 minutes after 2 hourspost-event. These settings could be pre-set or programmable.

The RAM 47 also contains memory sections for programmable parameters 471and calculated baseline data 475. The programmable parameters 471include the upper and lower limits for the normal and elevated heartrate ranges, and physician programmed parameters related to the cardiacevent detection processes stored in the program memory 45. Thecalculated baseline data 475 contain detection parameters extracted fromthe baseline electrogram segments stored in the baseline electrogrammemory 474. Calculated baseline data 475 and programmable parameters 471would typically be saved to the event memory 476 following the detectionof a cardiac event. The RAM 47 also includes patient data 473 that mayinclude the patient's name, address, telephone number, medical history,insurance information, doctor's name, and specific prescriptions fordifferent medications to be administered by medical practitioners in theevent of different cardiac events.

It is envisioned that the cardiosaver 5 could also contain pacemakercircuitry 170 and/or defibrillator circuitry 180 similar to thecardiosaver systems described by Fischell in U.S. Pat. No. 6,240,049.

The alarm sub-system 48 contains the circuitry and transducers toproduce the internal alarm signals for the cardiosaver 5. The internalalarm signal can be a mechanical vibration, a sound or a subcutaneouselectrical tickle or shock.

The telemetry sub-system 46 with antenna 35 provides the cardiosaver 5the means for two-way wireless communication to and from the externalequipment 7 of FIG. 1. Existing radiofrequency transceiver chip setssuch as the Ash transceiver hybrids produced by RF Microdevices, Inc.can readily provide such two-way wireless communication over a range ofup to 10 meters from the patient. It is also envisioned that short rangetelemetry such as that typically used in pacemakers and defibrillatorscould also be applied to the cardiosaver 5. It is also envisioned thatstandard wireless protocols such as Bluetooth and 802.11 a or 802.11 bmight be used to allow communication with a wider group of peripheraldevices.

A magnet sensor 190 may be incorporated into the cardiosaver 5. Animportant use of the magnet sensor 190 is to turn on the cardiosaver 5on just before programming and implantation. This would reduce wastedbattery life in the period between the times that the cardiosaver 5 ispackaged at the factory until the day it is implanted.

The cardiosaver 5 might also include an accelerometer 175. Theaccelerometer 174 together with the processor 44 is designed to monitorthe level of patient activity and identify when the patient is active.The activity measurements are sent to the processor 44. In thisembodiment the processor 44 can compare the data from the accelerometer175 to a preset threshold to discriminate between elevated heart rateresulting from patient activity as compared to other causes.

FIG. 5 illustrates in the form of a block diagram the operation of theheart signal processing program 450 for cardiac event detection by thecardiosaver 5 of FIGS. 1-4. The heart signal processing program 450 isan example of one of many such detection programs whose instructionscould reside in the program memory 45 for use by the CPU 44 of thecardiosaver 5 as shown in FIG. 4. The program shown in FIG. 5 ispreferably run continuously. There is another routine, shown in FIG. 7,that preferably is run once per hour. The hourly routine stores varioushistogram data (see U.S. patent application Ser. No. 10/950,401, filedSep. 28, 2004, entitled “Implantable system for monitoring the conditionof the heart”) and also operates in conjunction with the program shownin FIG. 5 to enable collection of baselines for each hourly period.

Turning to the program shown in FIG. 5, in block 800, various flags andcounters, whose roles will be described further below, are initialized.In block 802, a data segment is captured into the FIFO buffer 42 of FIG.4 and then transferred to the recent electrogram memory 472 of FIG. 4.

The data segment is Y seconds long, where Y is preferably 10.24 sec.,which corresponds to 2048 samples at a sampling rate of 200 Hz. Next, inblock 804, which is described in detail with reference to FIG. 9, theacquired data segment is categorized as one of the following:Abbreviation Description HI High Heart Rate EL-S Elevated Heart Ratewith an ST Shift EL-NS Elevated Heart Rate with no ST Shift N-S NormalHeart Rate with an ST Shift N-NS Normal Heart Rate with no ST Shift LO-SLow Heart Rate with an ST Shift LO-NS Low Heart Rate with no ST ShiftIR-S Irregular Heart Rate with an ST Shift IR-NS > P Irregular HeartRate with no ST Shift with lots of short beats IR-NS < P Irregular HeartRate with no ST Shift with few short beats TS Too Short (not enough“good” beats)

If the segment has been categorized as “too short” (or TS), meaning thatit does not have a sufficient number of acceptable beats, the program450 moves to block 806, where the too few counter is incremented by 1.The program 450 then moves to block 808. As will be described furtherbelow, the too few counter tracks the number of consecutive(processed/categorized) segments that are “too short” for the purpose ofgenerating an alarm in the case where there are so many consecutive TSsegments that a medical or device problem is possible.

Returning to block 804, if the segment exhibits an ST shift or a highheart rate (HI, EL-S, N-S, LO-S or IR-S), an alarm counter (alm cntr) isincremented in block 810. Also in block 810, low heart rate (lo ratecntr) and irregular (irreg cntr) counters are set to 0. These counterstrack the number of consecutive segments characterized by low heartrates and irregular rhythms, respectively. (Even though one of thecategories that results in a movement to block 810, LO-S, is associatedwith a low heart rate, the low rate counter is nonetheless set to 0because that counter tracks the number of low heart rate segments thatare not ST shifted.)

From block 810, the program 450 moves to block 816, where the too fewcntr and flat cntr counters are set to 0 because the current segment isnot TS (“too short”). These counters work in tandem to determine thenumber of consecutively acquired “too short” segments. Thus, any segmentthat is acquired that is not “too short” will result in setting thesecounters back to 0.

Again returning to block 804, if the segment has been categorized asnon-ST shifted and either elevated or normal heart rate (EL-NS or N-NS),the program 450 moves to block 812 and sets the lo rate cntr and irregcntr to 0. From block 812, the program 450 moves to block 818, where thealm cntr is set to 0. The alm cntr variable tracks the number ofconsecutive segments that exhibit an ST shift or a high heart rate.Thus, this counter is reset to 0 when any segment is acquired that isnot of that type. Similarly, the EL-S counter (EL-S cntr), which tracksthe number of consecutive segments characterized by an elevated heartrate and ST shift, is reset to 0.

Again returning to block 804, if the segment is categorized as low heartrate with no ST shift (LO-NS), control is transferred to block 814,where the lo rate cntr is incremented and the irregular rhythm counter(irreg cntr) is reset to 0. From block 514, control is transferred toblock 818.

Again returning to block 804, if the segment is characterized as havingan irregular rhythm with too many short beats with no ST shift(IR-NS>P), control is transferred to block 820, where the lo rate cntris reset to 0, and the irreg cntr is incremented. From block 820,control is transferred to block 818.

Again returning to block 804, if the segment is characterized as havingan irregular rhythm with few short beats and not having an ST shift(IR-NS<P), control is transferred to block 822, where the lo rate cntris reset to 0. From block 822, control is transferred to block 818.

All of the characterization and counter setting steps mentioned aboveeventually proceed to block 808, which checks whether the alarm counter(alm cntr) has reached the threshold ALM_(TH)) needed for detection.ALM_(TH) is preferably set to 3, which means that 3 consecutivelyprocessed/categorized segments must have been characterized asexhibiting an ST shift or a high heart rate before an event to said tobe detected. Thus, an ST shift or a high heart rate condition must besomewhat persistent to trigger an event detection, which helps to avoidfalse positive detections.

ALM_(TH) is a programmable parameter that could be increased to avoidfalse positive detections. With current average times from onset of aheart attack to arrival at a treatment center of 3 hours, a few minutesdelay for a device that should enable the patient to easily reach atreatment center within 30 minutes is valuable if it improves thereliability of detection.

If the alm cntr has reached ALM_(TH), the type of alarm to issue isdetermined, as will be further described below.

If alm cntr is less than ALM_(TH), control passes to block 824, whichchecks whether the low rate counter (lo rate cntr) has reached thethreshold (LORATE_(TH)) for detecting a low heart rate condition. If lorate cntr has reached the threshold (LORATE_(TH)), then control passesto block 826, which adjusts the threshold (LO_(TH)) for detecting lowheart rates (as will be further described with reference to FIG. 8) sothat LO_(TH)=LO_(TH)+LO_(INC) or 512, whichever is smaller. (Temporalquantities such as LO_(TH) are expressed as a number of samples at asampling rate of 200 Hz.)

Thus, for future segments, a lower heart rate is required tocharacterize a segment as a low heart rate segment. Both the initialLO_(TH) (i.e. the LO_(TH) that applies before the first segment isacquired after implantation) and LO_(INC) are programmable. An initialLO_(TH) value corresponding to approximately 50 beats/min (200*60/50 ata 200 Hz sampling rate) is preferred. A LO_(INC) corresponding toapproximately 5 beats/min (at 50 beats/min) is preferred.

The low rate counter (lo rate cntr) is reset and a low rate condition isdetected. Control then passes to the baseline checking routine (block832), which will be further described below.

Returning to block 824, if the low rate counter (lo rate cntr) is notless than LORATE_(TH), control passes to block 828, which checks whetherthe “too few” beats counter (too few cntr) has reached the threshold(TOOFEW_(TH)) for detecting too few good beats. If so, the “too few”beat routine is invoked, starting at block 864, as will be furtherdescribed below. If not, control passes to block 830, which checkswhether the “irregular rhythm” segment counter (irreg cntr) has reachedthe threshold (IRREG_(TH)) for triggering an event for irregular beats.If so, control passes to block 833, which resets irreg cntr to 0 andsets a flag indicating that an irregular condition has been detected.

Control then passes to the baseline checking routine beginning at block832. Control also passes to block 832 directly from block 830. Block 832checks whether a baseline is desired by examining a look for baselineflag. Whether a baseline is desired, in turn, depends upon a number offactors. First, whether a baseline is desired depends on whetherbaselining is enabled, which is externally programmable. If baseliningis not enabled, the lookfor baseline flag is set to 0 and does notchange (unless and until baselining is reenabled.) If baselining isenabled, then the heart signal processing program 450 will try to find abaseline for each hourly period, starting at the beginning of the hourlyperiod. If the heart signal processing program 450 has already found abaseline for the current hourly period, or if it has tried and failed tofind a baseline for the current hourly period, then the lookfor baselineflag will have been set to 0 (as will be further described withreference to FIG. 12) and control will be passed to block 834.Otherwise, the present segment will be checked to determine whether itis a proper baseline segment according to the routine indicated by block835 that is described further in FIG. 12. Control will then be passed toblock 834.

Block 834 checks whether any condition has been detected with thissegment. If not, control passes to block 837, which waits a certainamount of time before the next data segment is acquired in block 802.Specifically, if the current segment is normal and not ST shifted, thenthe program 450 waits for a relatively longer amount of time(P_(COLLECT)+P_(COLLECT2)) before acquiring the next segment, based onthe assumption that when the patient is normal and has a normal heartrate, segments need not be taken as frequently to determine if thepatient has or may develop a problem. In any other case, the program 450waits for a relatively shorter amount of time (P_(COLLECT)) beforeacquiring the next segment. Preferred times for P_(COLLECT) andP_(COLLECT2) are 30 seconds and 60 seconds, respectively.

In an alternate embodiment, some other criteria apart from (or inaddition to) time may determine the baseline acquisition time. Whether abaseline is desired depends on whether a baseline for the current periodhas already been found, or whether too many attempts have been made tofind a baseline for the current period, as will be further describedwith reference to FIG. 12.

Returning to block 834, if a condition has been detected, control passesto block 836. In block 836, the routine checks what type of actionshould be taken when a particular condition has been detected. There arefour possible actions which may generally be mapped by a medicalpractitioner to a particular condition: (1) generate an emergency alarm(and store data); (2) generate a “See Doctor” alert (and store data);(3) store data only; and (4) do nothing.

In block 836, if the condition is mapped to an emergency alarm, then thecontents of the recent electrogram data storage 472, preferably 8electrogram segments, is stored in the emergency alarm memory that ispart of the event memory 476. This allows the patient's physician toreview the electrogram segments collected during a period of time thatoccurred before the alarm, unless the data is overwritten by subsequentemergency alarm data. Also, a subset of the long term electrogram datain the long term electrogram memory 477 and the baseline electrogrammemory 474 are written into the emergency alarm memory.

Data corresponding to the first emergency alarm is stored in the“emergency alarm memory—1” area of memory. If it is not the firstemergency alarm, the data is stored in the “emergency alarm memory—2”area of memory. This approach means that if more than 2 emergency alarmsare detected before a ‘release memory’ command is received, then thesegments for the first (oldest) and the most recent (newest) are kept.

Because there is a possibility that segments from one or more emergencyalarms may be lost with this approach, a counter of the number ofemergency alarms since the last ‘release memory’ command was received,not shown in the figures, TOTEMER, is maintained.

After data is written to memory, if a counter ALARMDLY is 0, anemergency alarm is generated according to the alarm subroutine 490,which is described with reference to. FIG. 8. ALARMDLY, which isprogrammable, controls the duration that the device will not issue anyalarms, regardless of whether it detects a condition. This counter isdecremented every hour, as will be described with reference to FIG. 7.

In block 836, if the condition is mapped to “See Doctor Alert”, a subset(preferably the most recent 3 segments) of the recent electrogram data472 is stored in the appropriate place in “see doctor” memory. Also, thebaseline electrogram memory 474 is written into the “see doctor” memory.There are 6 areas of “see doctor” memory that are used in a circularbuffer. That is, if 7 see doctor alerts occur before a ‘release memory’command is received, segments for the 2nd through the 7th are kept. Ifboth ALARMDLY is 0 and see doctor holdoff are 0, then a “See DoctorAlert” vibration is generated by the alarm subroutine 490 described withreference to FIG. 8. The see doctor holdoff controls the amount of timeafter generation of a first “See Doctor Alert” that the next “See DoctorAlert” may be generated (if another “See Doctor Alert” type of conditionis detected). This counter is decremented every hour, as will bedescribed with reference to FIG. 7. It is reset to a default value of 24(hours) after a “See Doctor Alert” is generated, which means that any“See Doctor Alert” type conditions that occur in the subsequent 24 hourswill not result in the generation of a “See Doctor Alert.”

If the condition is not mapped to an alarm but to only storing data,then the data is stored in the circular buffer “See Doctor” memory.However, no vibration is initiated. Finally, if the condition is mappedto nothing at all, it is simply ignored.

Returning to block 808, if the alarm counter=ALM_(TH), a routine isinvoked to classify the type of condition that caused the alarm counterto reach threshold. In block 840, the alarm counter (alm cntr) is resetto 0 and control passes to block 842, which checks whether the currentelectrogram segment is characterized by a high heart rate. If so, a highheart rate flag is set in block 844 and control then passes to block832. If the segment is not associated with a high heart rate, block 842transfers control to block 846, which checks whether the currentelectrogram segment is characterized as an elevated heart rate with anST shift (EL-S). If not, control passes to block 848, which checks thepolarity of the ST shift (i.e. greater than or less than 0), withcorresponding positive and negative ST shift flags set in blocks 850 and852, respectively. From either of these blocks, control is transferredto block 832.

Returning to block 846, if the most recent segment is characterized asan elevated heart rate with an ST shift (EL-S), control basses to block854. An elevated heart rate with an ST shift (EL-S) may be a result ofexercise. To help avoid false positives, there are two conditions for STshift with elevated heart rates: “initial ischemia” and “persistentischemia”. “Initial ischemia” is detected much like other conditionsdescribed above: a set of characteristics for a number of consecutivesegments. “Persistent ischemia” is detected by detecting “initialischemia” a number of consecutive times. For a particular example, in apreferred embodiment, 3 consecutive EL-S segments will generally berequired to detect an “initial ischemia”, while 21 consecutive EL-Ssegments will generally be required to detect a “persistent ischemia”.

The 21 segment criterion is implemented by an EL-S counter (EL-S cntr),which is set to 7 after the “initial ischemia” is detected (first 3 EL-Ssegments), and decrementing this counter (in block 856) each timeanother consecutive “initial ischemia” is detected. (It is theoreticallypossible that 7 consecutive groups of 3 segments could give rise to“persistent ischemia” even though not all segments within each group isan EL-S. For example, if the pattern of N-S, N-S, EL-S were to repeatseven times, “persistent ischemia” would be detected. This would seem tobe quite unlikely from a physiological standpoint.)

The above mentioned EL-S scheme is implemented by checking the value ofthe EL-S counter in block 854. If the counter is 0, then the currentsegment indicates the detection of “initial ischemia”. If so, control ispassed to block 858, where the EL-S counter is set to (preferably) 7. Ifthe EL-S counter is not equal to 0, which indicates that a run of EL-Ssegments has been detected, the EL-S counter is decremented in block856. Control then passes to block 860, which checks whether the EL-Scounter is 0, which would signify a run of (preferably) 7 consecutivegroups of 3 EL-S segments (“initial ischemia” detections). If so, then a“persistent ischemia” flag is set in block 862. Otherwise, no alarm forthis segment is signified, and control passes to block 832.

Returning to block 828, if the too few cntr has reached the thresholdfor detecting a problem pertaining to a lack of detected heart beats,control passes from block 828 to block 864, where the flat line counter(flat cntr) is incremented. As previously mentioned, this counter, alongwith too few cntr, keeps track of the number of consecutive segmentswith too few beats. Specifically, the number of consecutive segmentswith too few beats is equal to TOOFEW_(TH)*flat cntr+too few cntr.TOOFEW_(TH) is preferably set to 4.

In block 866, the flat counter is compared to a threshold(FlatLine_(TH)), which is preferably equal to 3. If so, there has been asufficient number of consecutive segments with too few beats to signifya flat line condition, and control passes to block, where flat cntr andtoo few cntr are reset, and a “flat line” flag is set to indicate a flatline condition. If flat cntr is less than FlatLine_(TH), control passesto block 870, which resets too few cntr and sets a flag that signifies a“too few beats” condition.

FIG. 6 illustrates the features of a single normal beat 500 of anelectrogram segment and a single beat 500′ of an AMI electrogram segmentthat has a significant ST segment shift as compared with the normal beat500. Such ST segment shifting occurs within minutes following theocclusion of a coronary artery during an AMI. The beats 500 and 500′show typical heart beat wave elements labeled P, Q, R, S, and T. Thedefinition of a beat such as the beat 500 is a sub-segment of anelectrogram segment containing exactly one R wave and including the Pand Q elements before the R wave and the S and T elements following theR wave.

For the purposes of detection algorithms, different sub-segments,elements and calculated values related to the beats 500 and 500′ arehereby specified. The peak of the R wave of the beat 500 occurs at thetime T_(R) (509). The PQ segment 501 and ST segment 505 are sub-segmentsof the normal beat 500 and are located in time with respect to the timeT_(R) (509) as follows:

-   -   a. The PQ segment 501 has a time duration D_(PQ) (506) and        starts T_(PQ) (502) milliseconds before the time T_(R) (509).    -   b. The ST segment 505 has a time duration D_(ST) (508) and        starts T_(ST) (502) milliseconds after the time T_(R) (509).

The PQ segment 501′ and ST segment 505′ are sub-segments of the beat500′ and are located in time with respect to the time T′_(R) (509′) asfollows:

-   -   c. The PQ segment 501′ has a time duration D_(PQ) (506) and        starts T_(PQ) (502) milliseconds before the time T′_(R) (509′).    -   d. The ST segment 505′ has a time duration D_(ST) (508) and        starts T_(ST) (502) milliseconds after the time T′_(R) (509′).

The ST segments 505 and 505′ and the PQ segments 501 and 501′ areexamples of sub-segments of the electrical signals from a patient'sheart. The R wave and T wave are also sub-segments.

The dashed lines V_(PQ) (512) and V_(ST) (514) illustrate the averagevoltage amplitudes of the PQ and ST segments 501 and 505 respectivelyfor the normal beat 500. Similarly the dashed lines V′_(PQ) (512′) andV′_(ST) (514′) illustrate the average amplitudes of the PQ and STsegments 501′ and 505′ respectively for the beat 500′. The “STdeviation” ΔV (510) of the normal beat 500 and the ST deviation ΔV_(AMI)(510′) of the AMI electrogram beat 500′ are defined as:ΔV (510)=V _(ST) (514)−V_(PQ) (512)ΔV _(AMI) (510′)=V′ _(ST) (514′)−V_(PQ) (512′)Note that the both beats 500 and 500′ are analyzed using the same timeoffsets T_(PQ) and T_(ST) from the peak of the R wave and the samedurations D_(PQ) and D_(ST). In this example, the beats 500 and 500′ areof the same time duration (i.e. the same heart rate). The parametersT_(PQ), T_(ST), D_(PQ) and D_(ST) would typically be set with theprogrammer 68 of FIG. 1 by the patient's doctor at the time thecardiosaver 5 is implanted so as to best match the morphology of thepatient's electrogram signal and normal heart rate. V_(PQ) (512), V_(ST)(514), V_(R) (503) and ΔV (510) are examples of per-beat heart signalparameters for the beat 500.

FIG. 7 illustrates a preferred embodiment of a periodically performedroutine that is part of the program 450. The routine is run every Yminutes, with Y preferably set to 60 so that the routine is run once perhour. In block 900, the program 450 checks whether a timer, ALRMDLY, isbetween 0 and 255. This programmable timer allows alarms to besuppressed. If 0<ALRMDLY<255, then control passes to block 902, whereALRMDLY is decremented, such ALRMDLY keeps track of the number of hoursbefore a detected condition should be allow to generate an alarm oralert vibration. (Vibrations are allow only with ALRMDLY is equal to 0.

Note that if ALRMDLY is 0 it is not changed: i.e. is remains at 0.However, also note that if ALRMDLY is equal to 255, it also is notchanged, i.e. it remains at 255. ALRMDLY is set to 255 at the factory,preventing any vibrations while on the shelf prior to implantation.

From either block 900 or block 902, control passes to block 904, whichchecks whether the “see doctor holdoff” counter (see doctor holdoff) isgreater than 0. This counter provides a means for preventing multiple“See Doctor” alerts within a 24 hour period. It is set to 24 (hours)after any “See Doctor” alert occurs, thus ensuring that any subsequentconditions mapped to a “See Doctor” alert will have their vibrationssuppressed. If see doctor holdoff is greater than 0, control passes toblock 906, where see doctor holdoff counter is decremented (by onehour).

From either block 904 or 906, control passes to block 908, which checkswhether baselining is enabled. In some cases, it may be desirable toturn off baselining, which is accomplished by setting a flag,DisableBaselining, to 1. If baselining is not disabled, (i.e.DisableBaselining=0), control passes to block 910, which sets thelookfor baseline flag to “yes”. As previously mentioned, this flag ischecked in block 832 of FIG. 5 to determine whether a current segmentshould be checked as a candidate for a baseline. Also in block 910, thecounter base_(try) is set to 0. This counter tracks the number ofunsuccessful attempts to obtain a baseline. If it reaches a certainthreshold, as will be further described with reference to FIG. 12, thenno further attempts are made to find a baseline for the current hourlyperiod.

Control passes to block 912, where the baselineavg variable is examined.This variable, which is externally programmable, dictates whether thevalues that will be used for determining ST shifts are composed of anaverage of baseline values or a single baseline value. If baselineaveraging is enabled, control passes to block 914, which averages thebaseline heart signal parameters that are used to determine ST shifts.As will be described with reference to FIG. 10, a baseline ST-PQ value,shown as ΔV (510) in FIG. 6, is used to determine ST shifts. Also, abaseline R to PQ amplitude ΔR=V_(R)−V_(PQ) (see FIG. 6 for examples ofV_(R) and V_(PQ)) is used to determine ST shifts. In block 914, thebaseline ΔV value that will be used to determine ST shifts, ΔV_(BASE),is set equal to the average ΔV of the most recent U baselines,(1/U)ΣαV(j), where U is preferably 24 and αV(j) is the ΔV of the j'thbaseline. (When U is 24 and baselines are collected hourly, as ispreferable, ΔV_(BASE) is the average over one day, or 24 hours.)Similarly, the baseline ΔR value that will be used to determine STshifts, ΔR_(BASE), is set equal to (1/U)ΣαR(j), where U is againpreferably equal to 24 and ΔR(j) is the ΔR of the j'th baseline.

It is possible that baselines for some time slots are non-existant orhave become too old, in which case, as will be further described withreference to FIG. 12, default values ΔV_(normal) and ΔR_(normal) may beused as the ΔV(j) and ΔR(j) for those time slots j for which a baselinewas found to be non-existant or too old.

Instead of an average of the ΔV(j), some other statistical measure maybe generated to compare against the current ΔV. For example, a weightedaverage could be used whereby baselines corresponding to earlier timeslots (e.g. >12 hours ago) are weighted more heavily than baselinescorresponding to more recent time slots (e.g. <=12 hours ago). The exactnature of the averaging would depend on the expected normal rate of thechange of ΔV. Another alternative could involve taking the average ofthose ΔV(j) that fall within a standard deviation of the ΔV(j)distribution.

Returning to block 912, if baseline averaging is not enabled, controlpasses to block 916, which determines whether a baseline was collected Uhours ago for the current hourly period. For example, if U is 24, andthe hourly routine is run every hour on the hour, and it is currently1:00 p.m., block 912 checks whether baseline values ΔV and ΔR for the1:00 p.m. time slot are available, meaning that a baseline for that timeslot was found fairly recently, preferably within the last three days(see FIG. 12 for more details). If so, in block 918, ΔV_(BASE) andΔR_(BASE) are set equal to the ΔV and ΔR baseline values for thepertinent time slot (i.e. U hours ago). Otherwise, if baseline values ΔVand ΔR for that time slot are not available, default parametersΔV_(normal) and ΔR_(normal) are used in block 620 for ΔV_(BASE) andΔR_(BASE).

ΔV_(BASE) and ΔR_(BASE) computed in blocks 914, 918 or 920, are storedin the calculated baseline data memory 475 of FIG. 4.

FIG. 8. illustrates a preferred embodiment of the alarm subroutine 490.The alarm subroutine 490 is run when there have been a sufficient numberof events detected to warrant a major event cardiac alarm to thepatient. The alarm subroutine 490 begins with step 491 Next; in step 492the internal alarm signal is turned on by having the CPU 44 of FIG. 4cause the alarm sub-system 48 to activate a major event alarm signal.

Next in step 493 the alarm subroutine instructs the CPU 44 to send amajor event alarm message to the external alarm system 60 of FIG. 1through the telemetry sub-system 46 and antenna 35 of the cardiosaver 5of FIG. 4. The alarm message is sent once every L1 seconds for L2minutes. During this time step 494 waits for an acknowledgement that theexternal alarm has received the alarm message. After L2 minutes, if noacknowledgement is received, the cardiosaver 5 of FIG. 1 gives up tryingto contact the external alarm system 60. If an acknowledgement isreceived before L2 minutes, step 495 transmits alarm related data to theexternal alarm system. This alarm related data would typically includethe cause of the alarm, baseline and last event electrogram segments andthe time at which the cardiac event was detected.

Next in step 496, the cardiosaver 5 transmits to the external alarmsystem 60 of FIG. 1 other data selected by the patient's physician usingthe programmer 69 during programming of the cardiosaver. These data mayinclude the detection thresholds H_(ST)(i), H_(T)(i) and otherparameters and electrogram segments stored in the cardiosaver memory 47.

Once the internal alarm signal has been activated by step 492, it willstay on until the clock/timing sub-system 49 of FIG. 4 indicates that apreset time interval of L3 minutes has elapsed or the cardiosaver 5receives a signal from the external alarm system 60 of FIG. 1 requestingthe alarm be turned off.

To save power in the implantable cardiosaver 5, step 496 might checkonce every minute for the turn off signal from the external alarm system60 while the external alarm system 60 would transmit the signalcontinuously for slightly more than a minute so that it will not bemissed. It is also envisioned that when the alarm is sent to theexternal alarm system 60, the internal clock 49 of the cardiosaver 5 andthe external alarm system 60 can be synchronized so that the programmingin the external alarm system 60 will know when to the second, that thecardiosaver will be looking for the turn off signal.

At this point in the alarm subroutine 490 step 497 begins to record andsave to event memory 476 of FIG. 4, an E second long electrogram segmentevery F seconds for G hours, to allow the patient's physician and/oremergency room medical professional to read out the patient'selectrogram over time following the events that triggered the alarm.This is of particular significance if the patient, his caregiver orparamedic injects a thrombolytic or anti-platelet drug to attempt torelieve the blood clot causing the acute myocardial infarction. Byexamining the data following the injection, the effect on the patientcan be noted and appropriate further treatment prescribed.

In step 498 the alarm subroutine will then wait until a reset signal isreceived from the physician's programmer 68 or the patient operatedinitiator 55 of the external alarm system 60 of FIG. 1. The reset signalwould typically be given after the event memory 476 of FIG. 4 has beentransferred to a component of the external equipment 7 of FIG. 1. Thereset signal will clear the event memory 476 (step 499) and restart themain program 450 at step 451.

If no reset signal is received in L6 hours, then the alarm subroutine490 returns to step 451 of FIG. 5 and the cardiosaver 5 will once againbegin processing electrogram segments to detect a cardiac event. Ifanother event is then detected, the section of event memory 476 used forsaving post-event electrogram data would be overwritten with thepre-event electrogram data from the new event. This process willcontinue until all event memory is used. I.e. it is more important tosee the electrogram data leading up to an event than the data followingdetection.

FIG. 9 is a flow chart of the segment categorization routine of block804 (FIG. 5). In block 1000, the program 450 examines whether theprevious segment had too few good beats (i.e. was too short or TS). Ifso, the current segment will effectively be appended to the previoussegment to create a compound segment.

If the previous segment was not too short, control passes to block 1002,where various variables (Sbeats, NSbeats and SEGSHIFT) are reset to 0.Sbeats and NSbeats track the number of ST shifted and non-ST shiftedbeats during a segment or run of segments. SEGSHIFT tracks the total sumof ST shifts during a segment or run of segments. These variables arereset to 0 in block 1002 because the previous segment was not too short.

Control transfers to block 1004, which checks whether the number ofbeats (n_(p)) in the segment is greater than or equal to 2. If not, thesegment is too short, and is categorized as such in block 1006. As willbe discussed below, the segment may be categorized as too short even ifn_(p)>=2.

If n_(p) is greater than or equal to 2, as determined in block 1004,then control passes to block 1003, which involves a number of steps.First, the variable m, which is the number of beats to be analyzed, isset equal to n_(p,all)−2, where n_(p,all) is the number of R wave peaksin the segment to be categorized, which may be a compound segment. (I.e.n_(p,all) is the number of R wave peaks in a segment, which may consistof a number discrete “too short” single segments or a single segmentwith n_(p)>=2.) 2 is subtracted from n_(p,all) (in the m=n_(p,all)−2computation) because the first and last R wave peaks within the segmentmay not represent complete beats, i.e. the R-R interval before the firstR wave peak may not be available from the segment data while the STsegment after the last R wave peak may not be available from the segmentdata.

The next step in block 1003 involves computing the number of samplesbetween R wave peaks for the m beats to be processed, thereby computingR-R intervals RR(i), where i runs from 1 to m. Next, the average numberof samples between R peaks (P_(avg)=(1/m)ΣRR(i)) is calculated for the mbeats. The next step in block 1003 involves estimating the number ofirregular beats (m_(short)) in the segment. If an RR(i) interval for aparticular beat is much shorter than the average RR interval for thesegment (P_(avg)), then some sort of arrhythmia may be occurring, e.g.that beat may be an ectopic beat. (Such a beat should also not beanalyzed for ST shift.) Whether an RR(i) interval is considered to beabnormally short relative to other beats in the segment depends on theprogrammable parameter P_(SHORT). Specifically, a beat is determined tobe too short relative to other beats if its R-R interval is less than(P_(SHORT)/256)*P_(avg). 205 is an exemplary value for P_(SHORT), (whichis results in ˜80% (205/256) of P_(avg) as the criteria).

In block 1016, the number of irregular beats m_(short), is compared to athreshold IRREG_(BEATS). If m_(short)>IRREG_(BEATS), the segment iseither irregular or too short. To determine whether the segment tooshort, and also to determine whether the segment is ST shifted, controlpasses to the ST shift routine denoted by block 1018. This routine willbe described further below with reference to FIG. 10. The ST shiftroutine 1018 may categorize the segment as too short or ST shifted, inwhich case the segment is too short (TS) or irregular with an ST shift(IR-S), respectively. If the ST shift routine 1018 determines that thesegment is sufficiently long and not ST shifted, control passes to block1024, which determines whether the segment has a relatively large numberor relatively small number of “short” beats by comparing the number ofshort beats (m_(short)) with a programmable fraction P_(UNSTEADY)/8 ofthe total number of beats in the segment m.

An exemplary value of P_(UNSTEADY) is 2 (resulting in a fraction of25%). If m_(short)>m* P_(UNSTEADY)/8, then the segment is categorized asirregular, non-ST shifted with a relatively large number of short beats(IR-NS>P). Otherwise, the segment is categorized as irregular, non-STshifted with a relatively small number of short beats (IR-NS<P).

Returning to block 1016, if the number of irregular beats m_(short) isless than IRREG_(BEATS), so that the segment is not irregular, controlpasses to block 1030, which, along with blocks 1032 and 1034,categorizes the heart rate of the segment. These three blocks, 1030,1032 and 1034, compare the average RR interval P_(avg) to programmablethresholds HI_(TH), EL_(TH) and LO_(TH), corresponding to high, elevatedand low heart rates, respectively.

If the average RR interval suggests a high heart rate, block 1030transfers control to block 1036, which determines if there are asufficient number of beats in the segment by comparing the number ofbeats (m) with a programmable threshold M, which is preferably set to 6.This check is done to avoid characterizing a segment as a high heartrate segment based on only a few beats. A segment with a low P_(avg) mayhave only a few beats when, for example, some actual heart beats are notdetected and thus not included within the m beats. If m>=M, then thesegment is characterized as a high heart rate segment (HI). Otherwise,it is categorized as too short (TS).

All other heart rate ranges (estimated by P_(avg)) are checked for STshifts by the routine indicated by block 1018. In all of these heartrate types, elevated, normal, and low, the segment is placed into one ofthree categories depending upon whether the segment is ST shifted, andwhether it is too short.

If the heart rate is normal, and the ST shift routine determines thatthe segment is not shifted and is not too short (i.e. the segment isN-NS), then an additional check is made in block 1036 to determinewhether the segment might qualify as an acceptable baseline. (As will bedescribed with reference to the baseline routine outlined in FIG. 12,only N-NS segments may serve as baselines.) Specifically, block 1036checks whether the average ST shift of the segment is less than half ofthe positive and negative thresholds. A flag, LOShift, which is used inthe baseline routine as will be further described with reference to FIG.12, is set accordingly.

FIG. 10 is a flow chart of the ST shift routine 1018. The ST shiftdetection routine checks beats that meet certain criteria for an STshift (“ST analyzable beat”). The criteria a beat must meet in order tobe checked for ST shift (i.e. to be an ST analyzable beat) are that thebeat's period is not “too short” and not characterized by a high heartrate. The segment (which may be a compound segment) is declared to havean ST shift if M out of N “good” beats have an ST shift. The routine isstructured to keep a running count of the number of beats with andwithout an ST shift. There are 3 possible outcomes: M beats with an STshift are found before N−M+1 beats without an ST shift, N−M+1 beatswithout an ST shift are found before M beats with an ST shift, or thesegment doesn't have ST analyzable beats for either of the previousconditions to be met. For example, the default values of M and N are 6and 8, respectively. That means if 6 shifted beats are found before 3non-shifted beats are found, the segment is declared to have an STshift. Conversely, if 3 non-shifted beats are found before 6 shiftedbeats are found, the segment is declared to not have an ST shift. Notethat this means (using these default values for M and N) that adetermination can be made in as few as 3 ST analyzable beats and no morethan 8 ST analyzable beats. This means that a segment with fewer than 8ST analyzable beats may be TS (and a segment with 8 or more STanalyzable beats will never be TS).

Turning to FIG. 10, in block 1100, an index i is set equal to the indexof the first beat to be analyzed, and i_(max), which the index can notexceed, is set equal to m, the number of beats to be analyzed. If thecurrent segment is not a compound segment, i is set equal to 1, thefirst beat to be analyzed. Otherwise, the segment is compound, and i isset so that it points to the first beat of the most recently acquiredsegment, the previously acquired segment(s) in the compound segmentalready having been analyzed. Thus, i is set equal to 1+m−(n_(p)−1),where n_(p) is the number of peaks in the most recently acquiredsegment.

In block 1102, the beat referenced by i is checked to determine whetherit is too short by comparing its RR interval with P_(SHORT)/256*P_(avg).If the RR interval (RR(i)) is too small according to a comparison withother beats in the segment (P_(SHORT)*P_(avg)/256) thereby indicating ashort beat, the beat is not analyzed for an ST shift. More generally,beats associated with abnormal rhythms, as indicated by some heartrhythm parameter such as RR interval, may not represent a normal STshift, and therefore it is preferable to exclude such beats from thesegment for the purposes of analyzing ST shift. Control passes to block1106, which increments i so that it points to the next beat. Controlthen transfers to block 1108, which checks if the last beat has beenreached. If so, there are not enough good beats in the segment. (Forsegments with enough good beats, the logic of the ST shift routine 1018is configured such that the routine exits before i reaches i_(max).)

Returning to block 1102, if the RR interval (RR(i)) is greater than orequal to P_(SHORT)/256*P_(avg), control passes to block 1104, whereRR(i) is compared to the threshold RR interval for high heart rate(HI_(TH)). If the RR interval is too short, indicating too high a heartrate, the beat is not analyzed for ST shift and control transfers toblock 1106.

If the RR interval is sufficiently long, control passes to block 1110,which selects the appropriate heart rate bin based on the RR interval.In the preferred embodiment, there are 5 different heart rate rangesthat have corresponding ST shift thresholds and other parameters thatgovern the analysis of various portions of a beat. In particular, thestart of the PQ segment (measured as the number of samples backward fromthe R wave peak; see FIG. 6), the duration of the PQ segment (D_(PQ), inunits of samples), the start of the ST segment (measured as the numberof samples after the R wave peak), the duration of the ST segment(D_(ST), in units of samples), and the fraction of baseline R to PQamplitude (ΔR_(BASE)=V_(R,BASE)−V_(PQ,BASE)) to use as positive andnegative ST shift thresholds, respectively. These programmableparameters are listed in the table below. fraction fraction of averageof average duration duration (V_(R) − (V_(R) − of PQ of ST V_(PQ)) forV_(PQ)) for min # of max # of start of PQ (samples start of ST (samplesbaseline baseline heart samples samples (samples after (samples after touse as to use as rate between between before R start of after R start ofpositive negative bin peaks peaks peak) PQ) peak) ST) ST threshold STthreshold A4 HI_(TH) A3_(TH) - 1 T_(PQstart)(A4) D_(PQ)(A4)T_(STstart)(A4) D_(ST)(A4) P_(ST+)(A4) P_(ST−)(A4) A3 A3_(TH) A2_(TH) -1 T_(PQstart)(A3) D_(PQ)(A3) T_(STstart)(A3) D_(ST)(A3) P_(ST+)(A3)P_(ST−)(A3) A2 A2_(TH) A1_(TH) - 1 T_(PQstart)(A2) D_(PQ)(A2)T_(STstart)(A2) D_(ST)(A2) P_(ST+)(A2) P_(ST−)(A2) A1 A1_(TH) EL_(TH) -1 T_(PQstart)(A1) D_(PQ)(A1) T_(STstart)(A1) D_(ST)(A1) P_(ST+)(A1)P_(ST−)(A1) A0 EL_(TH) — T_(PQstart)(A0) D_(PQ)(A0) T_(STstart)(A0)D_(ST)(A0) P_(ST+)(A0) P_(ST−)(A0)

In the case of a beat following an ectopic beat, the R-R interval may bevery long because ectopic beats often have an unusually long ST/T/PQsegment, which would result in that following beat being put into alower heart rate bin than it should be placed. However, that beatfollowing the ectopic beat may often have an ST duration (D_(ST)) andother duration related parameters that are associated with a higher rate(i.e. the normal heart rate, excluding the ectopic beat.) In such acase, if an ectopic beat is detected, by for example comparing the R-Rinterval with the average R-R interval of a segment, then the beatfollowing the ectopic beat may be assigned an R-R interval equal to theaverage R-R interval of the segment.

In the discussion below, Ax refers to the heart rate bin correspondingto x. For example, D_(PQ)(Ax) is the duration of the PQ segment, whereAx can be A0, A1, A2, A3 or A4.

Also in block 1110, the PQ segment voltage is calculated asV_(PQ)(i)=average value of D_(PQ)(Ax) samples starting at the sampledefined by T_(R)(i−(m−(n_(p)−1)))−T_(PQstart)(Ax). (T_(R) is the numberof the sample at which the peak of the R wave occurs.) Similarly, inblock 1114, the ST segment voltage is calculated as V_(ST)(i)=averagevalue of D_(ST)(Ax) samples starting at the sample defined byT_(R)(i−(m−(n_(p)−1)))+T_(STstart)(Ax).

Also in block 1110, the ST deviation (ΔV in FIG. 6) of the beat iscalculated as ΔV=V_(ST)(i)−V_(PQ)(i). The ST shift, which compares thecurrent ST deviation with the baseline ST deviation (ΔV_(BASE)) iscalculated as SHIFT=ΔV−ΔV_(BASE). The cumulative ST shift for the entiresegment is calculated by adding the current SHIFT to SEGSHIFT. (Asmentioned, SEGSHIFT is used to compute the average ST shift for thebeats in a segment that were analyzed for ST shift, as mentioned withreference to block 1036 in FIG. 9).

In block 1122, the polarity of the ST shift, positive or negative, isdetermined, so that different threshold tests can be applied dependingon polarity, where the threshold tests indicate whether a beat issufficiently shifted to be considered shifted. Beats with a shiftgreater than or equal to 0 are tested in block 1124 while negativeshifted beats are tested in block 1126. In each case, the SHIFT iscompared with a heart rate dependent fraction (P_(ST+)(Ax)/128 orP_(ST−)(Ax)/128) of the baseline R to PQ amplitude (ΔR_(BASE)).ΔR_(BASE) serves as a proxy for signal strength, so a fraction ofΔR_(BASE) (i.e. ΔR_(BASE)*F where f is P_(ST+)(Ax)/128 orP_(ST−)(Ax)/128) is the amplitude of ST shift that is considered abovethreshold given the current signal strength.

In an alternate embodiment, the segment is tagged with a variable SF ashaving either a positive shift (block 1124) or a negative shift (block1126).

If the beat is below the ST shift threshold, the count of non-shiftedbeats (NSbeats) is incremented in block 1128. In block 1132, a test isperformed to determine if the segment already has enough non-shiftedbeats to avoid being categorized as a shifted segment, regardless ofwhether any additional beats in the segment are shifted. Recalling thatM out of N beats are required to categorize a segment as shifted, N−M+1beats without an ST shift mean that the segment can not have M shiftedbeats and is thus not shifted. Thus, in block 1132, if NSbeats>=N−M+1,then the segment is not shifted, and the ST shift routine exits.Otherwise, the next beat is analyzed starting with block 1106.

If the shift of the beat is above the ST shift threshold as determinedby blocks 1124 or 1126, the count of shifted beats (Sbeats) isincremented in block 1130. In block 1134, the number of shifted beatsSbeats is compared with M, the number of beats required to categorize asegment as shifted. If Sbeats>=M, then the segment is shifted and the STshift routine exits. Otherwise, the next beat is analyzed starting withblock 1106.

The above described structure of the ST shift routine ensures thatsegments with less than M beats, and having less than N−M+1 good beats,are categorized as too short. For example, if a segment consists of 5shifted beats, it is not considered shifted because it has less than M(=6) shifted beats. When the routine reaches block 1108 after processingthe fifth beat, it will categorize the segment as too short and exit. Asubsequent segment (or segments) will be appended to the segment tocreate a compound segment that is long enough to categorize as shiftedor non-shifted. The number of shifted and non-shifted beats (Sbeats andNSbeats) for the current segment as well as SEGSHIFT are stored and maybe incremented while processing the subsequent segment. In this manner,the total number of shifted and non-shifted beats (and SEGSHIFT) in acompound segment are tracked as consecutive TS segments are processedsequentially. As mentioned, once a segment is sufficiently long tocategorize for ST shift, the Sbeats, NSbeats and SEGSHIFT are reset to 0in block 1002 (FIG. 9) for the next segment.

FIG. 11 diagrams the alarm conditions 600 that are examples of thecombinations of major and minor events that can trigger an internalalarm signal (and/or external alarm signal for the guardian system ofFIG. 1. Box 610 shows the combinations 611 through 617 of major cardiacevents that can cause the alarm subroutine 490 to be run. These includethe following:

-   -   611. 3 ST shift events (detections of excessive ST shift) with        either a normal heart rate or a low heart rate.    -   612. 2 ST shift events with a normal or low heart rate and 1        event from heart rate too high.    -   613. 1 ST shift event with a normal or low heart rate and 2        events from heart rate too high.    -   614. 3 events from heart rate too high.    -   615. 3 ST shift events with either a normal, low or elevated        heart rate (ischemia) where the last detection is at a normal or        low heart rate.    -   616. 3 events (excessive ST shift or high heart rate) where the        last event is high heart rate.    -   617. An ischemia alarm indication from conditions in box 620        that remains for more than L5 minutes after the first detection        of ischemia.

The ischemia alarm conditions 620 include:

-   -   621. 3 ST shift events with either a normal, low or elevated        heart rate (ischemia) where the last detection is at an elevated        heart rate.    -   622. Any 3 events including a too high heart rate event where        the last detection is an excessive ST shift at an elevated heart        rate.

If either of the ischemia alarm conditions 620 is met and it is lessthan L5 minutes since the exercise induced ischemia was first detected,then the SEE DOCTOR ALERT signal will be turned on by step 682 of theischemia subroutine 480 if it has not already been activated.

Box 630 shows the other minor event alarm conditions including thebradycardia alarm condition 632 that is three successive electrogramsegments collected with heart rate too low and the unsteady heart ratealarm condition 635 that is caused by more than P_(unsteady) % of beatshaving a too short R-R interval.

These will trigger the SEE DOCTOR alert signal initiated by step 427 ofthe hi/low heart rate subroutine 420 for the bradycardia alarm condition632 and step 416 of the unsteady heart rate subroutine 410 for theunsteady heart rate alarm condition 635. Also triggering the SEE DOCTORalert signal is a low battery condition 636.

FIG. 12 is a flow chart of procedure that checks whether a segmentqualifies as a baseline and, if so, calculates the baseline quantitiesΔR(j) and ΔV(j), where j indexes the current time slot (i.e. one of 24hours if baselines are acquired hourly)

In block 1200 the program 450 checks whether the segment was classifiedas having a normal heart rate and no ST shift (N-NS). If not, thesegment can not be a baseline and, as will be further described below,various checks are made to determine if too many unsuccessful attemptshave been made to find a baseline, which may indicate an alarmablecondition.

Otherwise, if the segment is N-NS, additional preliminary checks aremade to determine whether the segment may qualify as a baseline. Inblock 1202, if the LOSHIFT variable has been set in block 1036 of FIG.9), which indicates that the segment is somewhat ST shifted but notenough to be considered a physiological problem, the segment can notqualify as a baseline. If LOSHIFT has not been set, control passes toblock 1204. There a check is made to make sure that segment beingexamined has beats through out the segment. (That is, a segment with 5beats in the first 5 seconds of the segment and no beats in the second 5seconds of the segment should not be used as a baseline segment.Formally, this check is performed by comparing (P_(avg)*(m+3)>1980).

If the segment is not disqualified by the preliminary tests in blocks1200, 1202 and 1204, each beat in the segment is checked in a mannersimilar to the ST shift routine, the major difference being that N−M+1beats good, non-shifted beats does not necessarily qualify a segment asa baseline. Instead, a more stringent test, which requires that thetotal number of “bad beats” be below a threshold (BEATS_(BAD)) isapplied. Also, in the baseline routine, running totals of the R to PQheight (V_(R)−V_(PQ)) and ST deviation are kept so that the ΔR(j) andΔV(j) quantities can be calculated for the segment if it qualifies as abaseline.

In block 1206, as in the ST shift routine, the beat index i is set to 1,i_(max) is set to m. In addition, RPQ_(base), STPQ_(base) andBeats_(good) variables are set to 0., RPQ_(base) and STPQ_(base) arerunning totals of the R to PQ height (V_(R)−V_(PQ) in FIG. 6) and STdeviation (ΔV in FIG. 6). Beats_(good) is the total number of good,non-shifted beats. In block 1208, the beat referenced by i is checked todetermine whether it is too short by comparing its RR interval withP_(SHORT)/256*P_(avg). If the RR interval (RR(i)) is too small accordingto a comparison with other beats in the segment (P_(SHORT)*P_(avg)/256),thereby indicating a short beat, the beat is not analyzed for an STshift.

Control passes to block 1210, which increments i so that it points tothe next beat. Control then transfers to block 1212, which checks if thelast beat has been reached. If so, control transfers to block 1214,which will be further described below. Otherwise, control returns toblock 1208.

Returning to block 1208, if the RR interval (RR(i)) is greater than orequal to P_(SHORT)/256*P_(avg), the beat is then checked to see if it isin the normal heart rate bin. In block 1216, RR(i) is compared to thethreshold RR intervals for low heart rate (EL_(TH)) and elevated heartrate (LO_(TH)), respectively, to ensure that the beat (i) is in thenormal range. If the RR interval is too short or too long (i.e. theinstantaneous heart rate is too high or too low, respectively), the beatis not analyzed for ST shift and control transfers to block 1210.

Otherwise, in block 1218, the PQ segment voltage is calculated asV_(PQ)(i)=average value of D_(PQ)(A0) samples starting at the sampledefined by T_(R)(i)−T_(PQstart)(A0). (Again, T_(R) is the number of thesample at which the peak of the R wave occurs.) Similarly, the STsegment voltage is calculated as V_(ST)(i)=average value of D_(ST)(A0)samples starting at the sample defined by T_(R)(i)+T_(STstart)(A0).

In block 1222, the polarity of the beat i's ST shift, positive ornegative, is determined, so that different threshold tests can beapplied depending on polarity. As in the ST shift routine, the ST shiftis V_(ST)(i)−V_(PQ)(i)−ΔV_(BASE). Positive (or non-shifted) beats aretested in block 1224 while negative shifted beats are tested in block1226. As in the ST shift routine, the ST shift is compared with afraction (P_(ST+)(A0)/128 or P_(ST−)(A0)/128) of the baseline R to PQamplitude (ΔR_(BASE)).

If the beat's ST shift is below the positive or negative threshold(whichever applies), in block 1228, the beat's R to PQ height(V_(PQR)=|V(T_(R)(i))−V_(PQ)(i)|) is added to the running totalRPQ_(base) and the beat's ST deviation (V_(ST)(i)−V_(PQ)(i)) is added toSTPQ_(base). Also, the Beats_(good) counter, which tracks the number ofgood, non-ST shifted beats, is incremented. Control then transfers backto block 1210. Returning to block 1224 or block 1226, whichever applies,if the beat's ST shift is above the positive or negative threshold(whichever applies), the beat is effectively excluded from the segmentby skipping block 1228. Specifically, control is transferred to block1210.

Moving forward to block 1214, if the number of bad beats(=i_(max)−Beats_(good)) is less than or equal to a threshold,(BEATS_(BAD)), preferably set to 1, then the segment qualifies as abaseline and control passes to block 1217. The “look for baseline” flagis set to 0 since the baseline has been found. The average ΔR for thesegment is set equal to RPQ_(base/Beats) _(good). However, if this valueis too small, it will not be used as ΔR(j) for the time slot becausesmall values of ΔR can bias checks for ST shifts. Specifically, in boththe ST shift routine and the baseline routine, ST shifts are determinedby comparing ST deviations with a threshold defined by a fraction ofbaseline ΔR_(BASE). Thus, if ΔR_(BASE) was very small, then thethreshold may be very small. Consequently, small ST shifts could beabove threshold, which is not desirable. To avoid this problem, ΔR(j)for any time slot is never allowed to be smaller than a parameterRPQ_(normal), which is preferably equal to 100.

The baseline's ST devation ΔR(j) is set equal to the average STdeviation for the good beats in the segment S_(TPQ)/Beats_(good). Acounter (stale cntr) which keeps track of how many consecutive hours anew baseline has not been found, is reset to 0. The segment iscompressed, preferably according to the turning point algorithm, andstored in an appropriate baseline memory slot. If this segment is notthe first segment in the hour to be checked, then a counter base_(try)will be greater than 0, in which case the previous segment is compressedand stored in an appropriate slot for bad baselines. (The operation ofthe counter base_(try) will be further described below.) From block1217, the baseline checking routine exits.

Returning to block 1214, if the number of bad beats(=i_(max)−Beats_(good)) is greater than BEATS_(BAD), then the segment isdisqualified as a baseline and control passes to block 1203, where a badbaseline event log is updated. Also, the counter base_(try), whichtracks the number of unsuccessful attempts made to find a baseline, isincremented. Control passes to block 1220, which checks whether thenumber of unsuccessful attempts made to find a baseline (base_(try))exceeds a threshold BASE_(trymax).

If not, the routine simply exits. Otherwise, control passes to block1223, which checks how long ago the existing baseline for the currenttime slot was acquired. Specifically, the time that a good baseline forthe current time period was found (current baseline timestamp) issubtracted from the current time kept by the clock 49 (see FIG. 4). Ifthis difference is too large, as measured by a threshold oldbase whichis preferably set to 84 hours (3.5 days), then the baseline isconsidered too old and is discarded. Instead, as mentioned in connectionwith blocks 914 and 920 in FIG. 7, default parameters ΔV_(normal) andΔR_(normal) will used in block 620 for ΔV_(BASE) and ΔR_(BASE) untilsuch time as a baseline segment is found for this time slot. In block1225, the baseline's time stamp is cleared (effectively discarding it).

From either block 1225 or block 1223, control transfers to block 1227which sets the lookfor baseline flag to “no” to indicate that no furtherattempts should be made to find a baseline for the current time slot.The stale cntr, which keeps track of the number of consecutive timeslots which have had unsuccessful attempts to find a baseline, isincremented.

Inability to collect baselines (a “can't find baseline” condition) mayarise from a number of causes. For example, if the patient's betablockers have stopped working or the dose it too low, the patient mighthave an elevated heart rate for many hours so that the heart is never inthe normal heart rate range. In fact, checking for a consistentinability to find baselines is a very useful procedure in that any causeof the patient's heart not having any “normal” segments over thebaseline alert time period will trigger the alarm subroutine. Suchcauses can either be related to the patient's heart or they may becaused misconfigured heart rate bins or by a fault in the software orelectrical circuitry of the implant. Inability to collect baselines willtypically trigger a “See Doctor” alert using alert routine 639 of thealarm subroutine 490.

However, the alarm may be suppressed, depending on the value of ALRMDLY.(See blocks 900 and 902 in FIG. 7 and corresponding discussion.) Inblock 1229, if ALRMDLY is not 0, the routine exits. Typically, ALRMDLYis non-zero prior to implantation. This check prevents continuous “can'tfind baseline” alerts while the device is on the shelf.

If ALRMDLY is 0, control passes to block 1230, which compares stale cntrto STALE_(TH). If stale cntr is not equal to STALE_(TH), then theroutine exists. Otherwise, control passes to block 1232, which involvescompressing the segment and storing it in the appropriate bad baselinememory slot, and setting a flag indicating a “can't find baseline”condition has been detected.

FIG. 13 is a flow chart of the R peak detection routine. Peaks arelocated by looking for one more large magnitude slopes (positive ornegative) followed by some, but not too many, samples with a smallmagnitude slope, which in turn are followed by a large magnitude slopeof the opposite direction. If all of these conditions have been met, apeak has been found somewhere within the set of samples that satisfiedthe above conditions. Once a peak has been found, the routine does notlook for another peak until after the end of the beat's ST segment (ifknown) or for a blanking interval defined by a certain number of samples(BLANKING), whichever is greater.

Throughout the discussion of this flowchart, S represents an array thatcontains samples corresponding to the current data segment. The counters, which represents the current sample, indexes into the array S, sothat S(s) is the s^(th) sample. As before, “i” is the beat counter. Inblock 1300, s is set to 53. The first 48 samples are discarded to avoidstart-up transient, to make room in memory for header information, andto get a 10.00 second segment. After these 48 samples, the routinestarts on the 6^(th) sample, because of the slope calculation, explainedbelow. Also in block 1300, the beat counter “i” is set to 0, as well asthe following variables: “blanking”, “R_(width)”, “POS_(LARGE)” and“NEG_(LARGE)”. Variables “POS_(EDGE)” and “NEG_(EDGE)” are set to “no”.The role of these variables will be described below. Finally, the memorythat stores the 8 most positive and negative slopes for the segment iscleared.

In block 1302, the s counter is incremented. In block 1304, the routinechecks whether the last sample in the segment, sample 2048, has beenreached. If so, final segment processing is performed in block 1306,which will be described below. Otherwise, control passes to block 1308,which increments the R_(width) counter, which tracks the width of thecurrent R wave (i.e. the R wave of the i'th beat.). In block 1310, the Rwidth is compared to a programmable threshold, R_(WIDTHMAX) (preferablyset to 10). If R_(width)>=R_(WIDTHMAX), then the current candidate foran R wave (tracked by R_(Width)) is considered not to be an R wave. Thischeck helps to prevent T waves, which may otherwise appear to be R wavesdue to sharp upstrokes and downstrokes but are generally wider than Rwaves, from being considered as R waves. If R_(width)>=R_(WIDTHMAX),control passes to block 1310, which resets R_(width) to 0 and sets“POS_(EDGE)” and “NEG_(EDGE)” each to “no”, Control is transferred toblock 1312, which also is reached directly from block 1310.

Block 1312 calculates the slope of the electrogram in the neighborhoodof the current sample s. In particular, the slope at s is set equal to:(S(s)+2*S(s−1)+S(s-2))−(S(s−3)+2*S(s−4)+S(s−5)). Control passes to block1314, which checks whether the slope is positive or 0. Positive andnegative slope sub-segments are processed in asymmetrical manner byroutines starting at blocks 1316 and 1318, respectively. The onlydifference between these procedures pertains to the polarity of tests(e.g. the positive slope procedure will check if the slope is greaterthan a threshold while the negative slope procedure will check if theslope is less than a threshold.)

Turning to the positive slope procedure, block 1316 checks whether theslope is more positive than any of the eight slopes stored in thepositive slope memory. If so, in block 1317, the slope is stored,replacing the least positive of the 8 stored slopes. From block 1317 orblock 1316, control passes to block 1320, which checks whether thevariable “blanking” is equal to 0. The value of this variable is thenumber of samples remaining in the blanking interval. If the blankinginterval is not over, the current sample is skipped. The blankinginterval is decremented in block 1322 and control returns to block 1302.

If the blanking interval is over, i.e “blanking”=0, then control passesto block 1324, which checks whether the slope is sufficiently large tobe considered an R wave upstroke by comparing the slope with a thresholdR_(POSth), which is dynamically adjusted in a manner to be describedbelow. If the slope is less than R_(POSth), control returns to block1302. Otherwise, control passes to block 1326, which checks whether anupstroke has already been identified for the current beat by checkingwhether the POS_(edge) variable is set to “yes.” If so, control returnsto block 1302. Otherwise, control passes to block 1328, which checkswhether a downstroke has already been identified for the current beat bychecking whether the NEG_(edge) variable is set to “yes.” If not, then apeak has not yet been located. Control passes to block 1330, where thePOS_(edge) variable is set to “yes” to indicate that an upstroke hasbeen found, and the R_(width) is reset to 0 to begin tracking the widthof what is possibly an R wave. Control again returns to block 1302.

Returning to block 1328, if the NEG_(edge) variable is set to “yes”,then the newly located upstroke possibly represents the upstroke of an Rwave that consists of a “v” like downstroke followed by an upstroke.However, if the width between the upstroke and downstroke is too large,the data may represent a T wave rather than an R wave. Conversely, ifthe if the width between the upstroke and downstroke is too small, thedata may represent a fluctuation (e.g. noise) that is not an R wave. Totest for both of these possibilities, in block 1332, the procedurechecks whether R_(width) is greater than or equal to R_(WIDTHMIN), andalso less than or equal to R_(WIDTHMAX), where R_(WIDTHMIN) andR_(WIDTHMAX) are programmable thresholds preferably set to 3 and 10,respectively. If R_(width) does not fall within these thresholds,control passes to block 1334, where the POS_(edge) variable is set to“yes” to indicate that an upstroke has been found, the R_(width) isreset to 0 to begin tracking the width of what is possibly an R wave,and the NEG_(edge) variable is set to “no”. Control again returns toblock 1302.

Returning to block 1332, if R_(width)falls within the range defined byR_(WIDTHMIN) and R_(WIDTHMAX), then an R wave is detected and controltransfers to block 1336. To find the peak, the sample with the minimumvalue (the bottom of the “v” shape) is located by searching through 6samples centered around the sample that was R_(width)/2 samples beforethe current sample. More formally, for j=(s−R_(width)/2−1)−3 to(s−R_(width)/2−1)+3, the minimum S(j) is found. The R wave time T_(R)(i)for beat i is set to the j that resulted in the minimum S(j). Next, thebeat counter i is incremented to indicate that the i^(th) R wave hasbeen located. The RR(i) interval, defined as the number of samplesbetween the current R wave peak and the previous R wave peak, is used todetermine the appropriate heart rate bin (A0-A4) for the beat. Theblanking interval is set such that it ends at the estimate of the end ofthe ST segment, unless the amount of time to the end of the ST segmentis less than BLANKING, in which case BLANKING is used as the blankinginterval.

The end of the ST segment is estimated by the heart rate dependentquantity (T_(STstart)(Ax)+D_(ST)(Ax)). If the beat is characterized as ahigh heart rate beat, or the beat is the first one in the segment,BLANKING is used as the blanking interval, (because the time of end ofthe ST segment is undefined for high heart reate beats and because theprevious beat is not known for the first beat found in a segment,respectively). POS_(edge) and NEG_(edge) are both reset to “no” toindicate that the routine is searching for the next R wave. Controlpasses back to block 1302.

Returning to block 1314, if the slope is negative, control passes toblock 1318. The subsequent processing is symmetrical to the processingfor positive slopes, except with appropriate polarity changes. Thus,block 1318 checks whether the slope is one of the 8 most negativeslopes. Block 1338 is identical to block 1318. Blocks 1340 and 1342 areidentical to blocks 1320 and 1322. Block 1344 checks whether the slopeis less than or equal to a threshold (R_(NEGth)), which is alsodynamically adjusted in a manner to be described below. Blocks 1346 and1348 check whether NEG_(edge) and POS_(edge), respectively, are “yes”.In block 1350, the NEG_(edge) variable is set to “yes” to indicate thata downstroke has been found and the R_(width) is reset to 0 to begintracking the width of what is possibly an R wave. In block 1354, and theNEG_(edge) variable is set to “yes” and the POS_(edge) variable is setto “no” to indicate that a downstroke has been found. Block 1352 isidentical to block 1332. Block 1356 is identical to block 1336 exceptthat peak of the carat shaped (ˆ) R wave, i.e. the j for which S(j) islargest, is found rather than the bottom of the v.

Returning to block 1304, if the end of the segment has been reached,control passes to block 1306, which calculates the positive and negativeslope thresholds (R_(POSth) and R_(NEGth)) to be used for the nextsegment. These thresholds are determined by computing a weighted averageof the current threshold and specified fraction of the 8 largest slopes.For example, for the case of R_(POSth), the weighted average is7*current R_(POSth)/8+x/8, where x is equal to a programmable fraction(P_(THRESH)/128) of the average of the current segment's 8 largestslopes, which in turn is sum of the 8 most positive slopes in thesegment divided by 8. The calculated values are checked and adjusted ifnecessary to make sure they don't change too quickly or get too close to0. Specifically, for the case of R_(POSth), the computed R_(POSth) iscompared to the old R_(POSth) plus MaxAwayFrom0, a programmableparameter that serves as an upper bound to how much R_(POSth) is allowedto increase from segment to segment. If R_(POSth) is larger than the oldR_(POSth) plus MaxAwayFrom0, then R_(POSth) is set equal to the oldR_(POSth) plus MaxAwayFrom0. Similarly, if the computed R_(POSth)indicates a rapid decrease, R_(POSth)is set equal to the old R_(POSth)minus MaxToward0, a programmable parameter that serves as an upper boundto how much R_(POSth) is allowed to decrease from segment to segment.And finally, R_(POSth)is not allowed to shrink below 32. The procedurefor R_(NEGth)is analogous. The preferred value for MaxAwayFrom0 is 10and the preferred value for MaxToward0 is 255 (effectively disablingthis limit).

An alternate to ST shift detection is to process just the T wave, whichcan change its peak or average amplitude rapidly if there is a heartattack. The T wave can, however change its amplitude slowly under normalconditions so a T wave shift detector would need a much shorter time Uthan that of a detector using the ST segment before the T wave. If thedetector is checking for such T wave shift, i.e. a voltage shift of theT wave part of the ST segment, then it may be desirable to check againsta baseline where U is 1 to 30 minutes and W is 15 seconds to 15 minutes.For example, U=3 minutes and W=15 seconds is a preferred setting tocatch a quickly changing T wave. This would also allow use of recentelectrogram segments stored in the recent electrogram memory of FIG. 4as baseline electrogram segments for T wave shift detection. It isenvisioned that the programmer 68 of FIG. 1 would allow the patient'sdoctor to program the cardiosaver 5 to use ST segment shift or T waveshift detectors by themselves, or together simultaneously. If both wereused then the programmer 68 would allow the patient's doctor to choosewhether a positive detection will result if either technique detects anevent or only if both detect an event.

The parameters Y, P_(COLLECT), P_(COLLECT2), U and W are stored with theprogrammable parameters 471 in the RAM 47 in FIG. 4. These parametersmay be permanently set at the time of manufacturing of the cardiosaver 5or they may be programmed through the programmer 68 of FIG. 1. Thecalculated criteria for cardiac event detection extracted from thebaseline electrogram segments stored in baseline electrogram memory 474are stored in the calculated baseline data memory 475 of the RAM 47.

Although it may be effective to fix the values of time offsets T_(PQ)(502) and T_(ST) (504) and the durations D_(PQ) (506) and D_(ST) (508),it is envisioned that the time offsets T_(PQ) and T_(ST) and thedurations D_(PQ) and D_(ST) could be automatically adjusted by thecardiosaver 5 to account for changes in the patient's heart rate. If theheart rate increases or decreases, as compared with the patient's normalheart rate, it envisioned that the offsets T_(PQ) (502) and T_(ST) (504)and/or the durations D_(PQ) (506) and D_(ST) (508) could vary dependingupon the R-R interval between beats or the average R-R interval for anelectrogram segment. A simple technique for doing this would vary theoffsets T_(PQ) and T_(ST) and the durations D_(PQ) and D_(ST) inproportion to the change in R-R interval. For example if the patient'snormal heart rate is 60 beats per minute, the R-R interval is 1 second;at 80 beats per minute the R-R interval is 0.75 seconds, a 25% decrease.This could automatically produce a 25% decrease in the values of T_(PQ),T_(ST), D_(PQ) and D_(ST). Alternately, the values for T_(PQ), T_(ST),D_(PQ) and D_(ST) could be fixed for each of up to 20 preset heart rateranges. In either case, it is envisioned that after the device has beenimplanted, the patient's physician would, through the programmer 68 ofFIG. 1, download from the cardiosaver 5 to the programmer 68, a recentelectrogram segment from the recent electrogram memory 472. Thephysician would then use the programmer 68 to select the values ofT_(PQ), T_(ST), D_(PQ) and D_(ST) for the heart rate in the downloadedrecent electrogram segment. The programmer 68 would then allow thephysician to choose to either manually specify the values of T_(PQ),T_(ST), D_(PQ) and D_(ST) for each heart rate range or have thecardiosaver 5 automatically adjust the values of T_(PQ), T_(ST), D_(PQ)and D_(ST) based on the R-R interval for each beat of any electrogramsegment collected in the future by the cardiosaver 5. It is alsoenvisioned that only the offset times, T_(PQ) and T_(ST), might beautomatically adjusted and the durations D_(PQ) and D_(ST) would befixed so that the average values of the ST and PQ segments V_(PQ) (512),V_(ST) (514), V′_(PQ) (512′) and V′_(ST) (514′) would always use thesame number of data samples for averaging.

When used in pacemakers or combination pacemaker/ICDs it envisioned thatthe start time T_(ST) and duration D_(ST) of the ST segment may havedifferent values than during sinus rhythm (when the pacemaker is notpacing) as pacing the heart changes the characteristics of ischemic STshifts causing them to occur later relative to the start of the R wave.It is also envisioned, that the offset for the start of the ST segmentmay be better measured from the S Wave instead of the R wave used forsinus rhythm when the pacemaker is not pacing. The technique of usingdifferent timing parameters for start and duration when pacing can beapplied to analysis of any sub-segment of the electrogram including thesub-segment that includes the T wave peak.

It is also envisioned that the patient would undergo a stress testfollowing implant. The electrogram data collected by the implant 5 wouldbe transmitted to the programmer 68 of FIG. 1, and one or more of theparameters T_(PQ) (502), T_(ST) (504), D_(PQ) (506) and D_(ST) (508) ofFIG. 6 would be automatically selected by the Programmer based on theelectrogram data from the stress test. The data from the stress testshould cover multiple heart rate ranges and would also be used by theprogrammer 68 to generate the excessive ST shift detection percentagethresholds P_(ST) for each of the heart rate ranges. In each case wherethe programmer 68 automatically selects parameters for the ST shiftdetection algorithm, a manual override would also be available to themedical practitioner. Such an override is of particular importance as itallows adjustment of the algorithm parameters to compensate for missedevents or false positive detections.

The S wave peak voltage V_(S) (507) is also shown on the baseline beat500 in FIG. 6. While the preferred embodiment of the present inventionuses an average ΔR(avg) of the average PQ to R wave amplitudes ΔR(i) asthe normalization voltage for setting the threshold for ST shiftdetection, it is also envisioned that normalization voltage could be theaverage of the entire R wave to S wave amplitude (V_(R)−V_(S)) or itcould be the larger of ΔR(i) or the PQ to S amplitude ΔS(i)=V_(S) 31V_(PQ). It is important to note here that the threshold for ST shiftdetection is set as a percentage of the average of baseline averagesignal amplitudes. This is important because the baseline signal is onlycollected if the electrogram is normal and therefore the thresholdswould not be affected by transient changes in signal amplitude (e.g. Rwave height) that can occur during an ST elevation myocardialinfarction. Therefore, for the purposes of the present invention thethreshold is calculated as a percentage of an average of the signalamplitude of U baselines. In turn, the signal amplitude of each of the Ubaselines is the average signal amplitude of at least two beats of thebaseline electrogram segment where the average signal amplitude of abaseline segment can be any of the following:

-   -   the average PQ segment to R voltage difference ΔR(i),    -   the peak-to-peak voltage of the beat (i.e. the R to S wave        voltage difference) (V_(R)−V_(S)),    -   the average PQ segment to S wave voltage difference ΔS(i),    -   the larger of ΔR(i) or ΔS(i), or    -   any average signal amplitude calculated from at least two beats        of the baseline electrogram segment.

One embodiment of ST shift and T wave shift detection might use abaseline for ST shift detection that is an average of the baselines overthe 24±½ hour period before and a baseline for T wave shift that is 1 to4 minutes in the past. This would require that the baseline extractionsubroutine 835 be run for T wave shift parameters approximately every 60seconds and for ST segment parameters every hour.

FIG. 14 shows a modified embodiment of the guardian system 510. Thecardiosaver implant 505 with lead 512, electrode 514, antenna 516,header 520 and metal case 511 would be implanted subcutaneously in apatient at risk of having a serious cardiac event such as an acutemyocardial infarction. The lead 512 could be placed eithersubcutaneously or into the patient's heart. The case 511 would act asthe indifferent electrode. The system 510 also included externalequipment that includes a physician's programmer 510 an external alarmtransceiver 560 and a pocket PC 540 with charger 566. The external alarmtransceiver 560 has its own battery 561 and includes an alarm disablebutton 562 radiofrequency transceiver 563, speaker 564, antenna 565 andstandard interface card 552. The cardiosaver 505 has the samecapabilities as the cardiosaver 5 of FIGS. 1 through 4.

The standardized interface card 552 of the external alarm transceiver510 can be inserted into a standardized interface card slot in ahandheld or laptop computer. The pocket PC 540 is such a handheldcomputer. The physician's programmer 510 is typically a laptop computer.Such standardized card slots include compact flash card slots, PCMCIAadapter (PC adapter) card slots, memory stick card slots, Secure Digital(SD) card slots and Multi-Media card slots. The external alarmtransceiver 510 is designed to operate by itself as a self-containedexternal alarm system, however when inserted into the standardized cardslot in the pocket PC 540, the combination forms an external alarmsystem with enhanced functionality. For example, in stand alone modewithout the pocket PC 540, the external alarm transceiver 560 canreceive alarm notifications from the cardiosaver implant 505 and canproduce an external alarm signal by generating one or more soundsthrough the speaker 564. These sounds can wake the patient up or provideadditional alerting to that provided by the internal alarm signalgenerated by the cardiosaver 505. The alarm disable button 562 canacknowledge and turn off both external and internal alarm signals. Thestandalone external alarm transceiver 560 therefore provides keyfunctionality could be small enough to wear on a chain around the neckor on a belt.

When plugged into the pocket PC 540, the external alarm transceiver 560can facilitate the display of text messages to the patient andelectrogram data that is transmitted from the cardiosaver 505. Thepocket PC 540 also enables the patient operated initiator 55 and panicbutton 52 capabilities of the external alarm system 60 of FIG. 1. Beinga pocket PC also readily allows connection to wireless communicationcapabilities such as wireless internet access that will facilitateretransmission of data to a medical practitioner at a geographicallyremote location. It is also envisioned that the charger 566 couldrecharge the batter 551 when the external alarm adaptor 560 is pluggedinto the pocket PC 540.

The external alarm transceiver 560 can also serve as the wirelesstwo-way communications interface between the cardiosaver 505 and theprogrammer 510. The physician's programmer 510 is typically a laptopcomputer running some version of the Microsoft Windows operating system.As such, any or the above standardized slot interfaces can be eitherdirectly interfaced to such a laptop computer or interfaced using areadily available conversion adaptor. For example, almost all laptopcomputers have a PCMCIA slot and PCMCIA card adaptors are available forcompact flash cards, Secure Digital cards etc. Thus the external alarmadaptor 560 could provide the interface to the physician's programmer510. This provides additional security as each cardiosaver implant 505and external alarm adaptor 560 could be uniquely paired with built insecurity codes so that to program the implant 505, the physician wouldneed the patient's external alarm adaptor 560 that would act both as awireless transceiver and as a security key.

Although the guardian system 10 as described herein could clearlyoperate as a stand-alone system, it is clearly conceivable to utilizethe guardian system 10 with additional pacemaker or implanteddefibrillator circuitry. As shown in FIG. 4, pacemaker circuitry 170and/or defibrillator circuitry 180 could be made part of any cardiosaver5 or 505. Furthermore, two separate devices (one pacemaker or onedefibrillator plus one cardiosaver 5) could be implanted within the samepatient.

FIG. 15 illustrates a preferred physical embodiment of the externalalarm transceiver 560 having standardized interface card 552, alarmdisable button 562 labeled “ALARM OFF” and speaker 564. It is alsoenvisioned that by depressing and holding the alarm disable button 562for a minimum length of time, when there is not an alarm, the externalalarm transceiver could verify the operational status of the cardiosaver505 and emit a confirming sound from the speaker 564.

FIG. 16 illustrates the physical embodiment of the combined externalalarm transceiver 560 and pocket PC 540 where the standardized interfacecard 552 has been inserted into a matching standardized interface cardslot the pocket PC 540. The screen 542 of the pocket PC 540 shows anexample of the display produced by an external alarm system followingthe detection of an acute myocardial infarction by the cardiosaver 505.The screen 542 of FIG. 15 displays the time of the alarm, the recentelectrogram segment from which the cardiac event was detected and thebaseline electrogram segment used for comparison in the cardiac eventdetection. Such a display would greatly facilitate diagnosis of thepatient's condition upon arrival at an emergency room and couldeliminate the need for additional electrocardiogram measurements beforethe patient is treated.

FIG. 17 shows an advanced embodiment of the external alarm transceiver720 having a battery 721, an alarm disable button 722, a RF transceiverfor data communication to and from the implanted device, a loudspeaker724, a microphone 727, a local area wireless interface 723, a standardinterface 728 and a long distance (LD) voice/data communicationinterface 729. The function of the alarm disable button 722 and theradiofrequency transceiver 723 are as described for the similar devicesshown in FIG. 13.

The local area wireless interface 723 provides wireless communicationwithin a building (e.g. home, doctor's office or hospital) to and fromthe implant 505 with lead 512 and antenna 516 through the external alarmtransceiver 720 from and to assorted external equipment such as PocketPCs 702, Palm OS PDAs, Notebook PCs, physician's programmers 704 andtablet diagnostic systems 706. The means for transmission from the localarea wireless interface 723 may be by radiofrequency or infra-redtransmission. A preferred embodiment of the local area wirelessinterface 723 would use a standardized protocol such as IRDA withinfra-red transmission and Bluetooth or WiFi (802.11.a, b, or g) withradiofrequency transmission. The local area wireless interface 723 wouldallow display of implant data and the sending of commands to the implant505.

The standard interface 728 provides a physical (wired) connection fordata communication with devices nearby to the patient for the purposesof displaying data captured by the implant 505 and for sending commandsand programs to the implant 505. The standard interface 728 could be anystandard computer interface; for example: USB, RS-232 or parallel datainterfaces. The pocket PC 702 and physician's programmer 704 would havefunctionality similar to the pocket PC 540 and physician's programmer510 of FIG. 13.

The tablet diagnostic system 706 would provide a level of functionalitybetween that of the pocket PC 702 and physician's programmer 706. Forexample, the tablet diagnostic system would have the programmer'sability to download complete data sets from the implant 505 while thepocket PC is limited to alarm and baseline electrogram segments or themost recent electrogram segment. The tablet diagnostic system 706 wouldbe ideal for an emergency room to allow emergency room medicalprofessionals to quickly view the electrogram data stored within theimplant 505 to assess the patient's condition. The recently introducedTablet PCs such as the Toshiba Portege 3500 or the Compaq TC1000 haveIRDA, WiFi and USB interfaces built into them and so would make an idealplatform for the tablet diagnostic system 706. It is envisioned thatsuch a tablet diagnostic system in an emergency room or medical clinicwould preferably be connected to its own external alarm transceiver. Thetablet diagnostic system 706 could be hand held or mounted on a wall orpatient bed. A unit located near the bed of an incoming patient having aguardian implant 505 would enable display of patient diagnostic datawithout requiring any attachments to the patient. Such wirelessdiagnosis is similar to that envisioned for the tricorder and diagnosticbeds of the Star Trek science fiction series created by GeneRoddenberry.

The long distance voice/data communication interface 729 with microphone727 and also attached to the loudspeaker 724 will provide the patientwith emergency contact with a remote diagnostic center 708. Such asystem could work much like the ONSTAR emergency assistance system nowbuilt into may cars. For example, when a major or EMERGENCY alarm isidentified by the guardian implant 505, the following steps could befollowed:

-   -   1. The guardian will first ascertain if an external alarm        transceiver is within range, if not the internal alarm will be        initiated.    -   2. If the external alarm transceiver is within range the system        will next see if there is access to the remote diagnostic center        708 through the long distance voice/data communication interface        729. If not the external alarm transceiver 720 and implant 505        will initiate internal and/or external alarm notification of the        patient.    -   3. If there is access to the remote diagnostic center 708 the        long distance voice/data communication interface 729, the        patient alarm information including alarm and baseline        electrogram segments will be transmitted to the remote        diagnostic center 708. A medical professional at the remote        diagnostic center 708 will view the data and immediately        establish voice communication to the external alarm transceiver        720 through the long distance voice/data communication interface        729. If this occurs, the first thing that the patient will hear        is a ringing tone and/or a voice announcement followed by the        contact with the medical professional who can address the        patient by name and facilitate appropriate emergency care for        the patient. In this case, the internal and external alarms will        not be needed and to the patient it will resemble an incoming        telephone call from the medical professional. It is also        envisioned that the voice of the medical professional could be        the first thing that the patient hears although an initial        alerting signal is preferred.

This method of establishing the highest level of communication availableto the guardian system with the fall back of just the internal alarmwill provide the best possible patient alerting based on what isavailable at the time of the alarm.

The data communications between the external alarm transceiver 720 andthe remote diagnostic center 708 would utilize a standardized (orcustom) data communications protocol. For example, the datacommunications might utilize any or all of the following either within aprivate network, a VPN, an intranet (e.g. a single provider network suchas the Sprint data network) or through the public internet:

-   -   1. Basic TCP/IP messaging within a single network or through the        internet.    -   2. Short Messaging Service (SMS)    -   3. Multimedia Message Service (MMS) used for cell phone        transmission    -   4. Universal Datagram Protocol (UDP)

It is also envisioned that the present invention would take advantage ofexisting telephone network call center technology including use ofAutomatic Number Identification (ANI) to identify the incoming call, andDialed Number Identification Service (DNIS) where different numbersmight be dialed by the external alarm transceiver 720 depending on theseverity of the detected cardiac event. For example, in the case wherethe call is placed by the emergency alarm transceiver 720, an EMERGENCYalarm might dial a different number than a SEE DOCTOR alert which mightbe different from a patient-initiated “panic button” call. DNIS couldhelp get the appropriate help for the patient even if data connectivityis unavailable and might be used to prioritize which call is answeredfirst (e.g., an EMERGENCY alarm would have higher priority than a SEEDOCTOR alert).

It is also envisioned that the remote diagnostic center 708 couldfacilitate the scheduling of an appointment with the patient's doctorfollowing a SEE DOCTOR alert.

Although throughout this specification all patients have been referredto in the masculine gender, it is of course understood that patientscould be male or female. Furthermore, although the only electrogramindications for an acute myocardial infarction that are discussed hereinare shifts involving the ST segment and T wave height, it should beunderstood that other changes in the electrogram (depending on where inthe heart the occlusion has occurred and where the electrodes areplaced) could also be used to determine that an acute myocardialinfarction is occurring. Furthermore, sensors such as heart motionsensors, or devices to measure pressure, pO₂ or any other indication ofan acute myocardial infarction or cardiac events could be usedindependently or in conjunction with a ST segment or T wave shiftdetectors to sense a cardiac event.

It is also envisioned that all of the processing techniques describedherein for an implantable cardiosaver are applicable to a guardiansystem configuration using skin surface electrodes and a non-implantedcardiosaver 5 the term electrogram would be replaced by the termelectrocardiogram. Thus the cardiosaver device described in FIGS. 5through 12 would also function as a monitoring device that is completelyexternal to the patient.

FIG. 18 is an alternate scheme for detecting ST shift related conditionsthat may be used in conjunction the cardiosaver event detection programshown in FIG. 5. The routine shown in FIG. 18 performs different testsfor detecting ST shift conditions depending on the polarity of the STshift (positive or negative) and heart rate. With a “can to tip” leadorientation, positive ST shifts may necessarily indicate a severe typeof ischemia arising from an acute blockage of a coronary artery. On theother hand, negative ST shifts could result either from such an acuteblockage or from exercise/higher heart rates.

Furthermore, the inventors' work has shown that, when a heart ratereturns to the normal range after being elevated, negative ST shifts asrecorded by a “can to tip” electrode often persist for a number ofminutes. The program shown in FIG. 18 allows this “exercise induced”ischemia condition to be distinguished from a case in which a negativeST shift lasts for a long time at low heart rates, which may beindicative of a more severe form of ischemia.

To track both the polarity of ST shifts and heart rate, the programshown in FIG. 18 includes four counters, N-SP, EL-SP, N-SN and EL-SN.N-SP and EL-SP count the number of segments with positive ST shifts atnormal and elevated heart rates, respectively. N-SN and EL-SN count thenumber of segments with negative ST shifts at normal and elevated heartrates, respectively. All of these counters are initialized to 0 in block1400, which may be added to the initialization block 800 in FIG. 5.

After a segment is acquired (see block 802 of FIG. 5), it is categorizedin block 1402 (analogous to block 804 of FIG. 5). If the segment ischaracterized by a positive shift, control is transferred to block 1404or block 1406 according to whether the segment is N-SP or EL-SP. If thesegment is characterized by a negative shift (N-SN or EL-SN), control istransferred to block 1408 or block 1410 according to whether the segmentis N-SN or EL-SN. If the segment is not ST shifted, control istransferred to block 1412.

In blocks 1404 and 1406 the EL-SP cntr and the N-SP cntr are incrementedrespectively. In blocks 1414 and 1416, respectively, the EL-SP cntr andthe N-SP cntr are checked against programmable thresholds EL-SP_(TH)andN-SP_(TH)respectively. N-SP_(TH)is preferably set to 3, which means thatpositive shifts at normal heart rates will trigger an N-SP detectablecondition within 90 segments at the normal 30 second acquisitioninterval. A longer amount of time, preferably five minutes(EL-SP_(TH),=300 s/30 s=10), may be required to trigger a detectablecondition at higher rates. Blocks 1422 and 1424 respectively set flagsindicating the detection of a positive shift for elevated and normalheart rates, respectively.

It is possible for a positive ST shift to persist during a transition ofthe heart rate between normal and elevated. In this case, it may bedesirable to detect a positive shift condition, even if neither the N-SPcntr nor the EL-SP cntr have reached threshold. To effect such adetection, block 1430 compares the number of consecutive positive STshifted segments, the sum of the N-SP cntr and the EL-SP cntr, iscompared to a threshold M-SP_(TH)for mixed heart rate positive STshifts, and a mixed heart rate shift condition is flagged in block 1434if the sum exceeds the threshold. If N-SP_(TH) is set at a small value,such as its preferred value of 3, step 1430 is not important.

In block 1438, the negative shift counters N-SN cntr or EL-SN cntr arereset to 0. This step ensures that the system can keep track of thenumber of consecutive negative ST shifted segments.

After block 1438, control passes to block 834 of FIG. 5. It will beappreciated that the additional condition detection described withreference to FIG. 5 may be performed in conjunction with the ST polarityand heart rate routine shown in FIG. 18.

The steps for processing negative ST shifts are analogous to the stepsfor processing positive ST shifts. In blocks 1408 and 1410,respectively, the EL-SN cntr and N-SN cntr, respectively, areincremented. In blocks 1418 and 1420, respectively, the EL-SN cntr andN-SN cntr, respectively, are compared to programmable normal andelevated thresholds EL-SN_(TH) and N-SN_(TH) respectively. With a “canto tip” lead orientation, it may be desirable to make the thresholdsN-SN_(TH) and EL-SN_(TH) longer than the corresponding positive STthresholds N-SN_(TH) and EL-SN_(TH). N-SN_(TH) is preferably set toapproximately 5 minutes. In the case where a negative ST shift persistor worsens after exercise (or more generally a transition from a highheart rate to a low heart), 5 minutes may allow the negative shift toresolve. At higher heart rates, a longer threshold may be desirable, apreferred value for .EL-SN_(TH) being approximately, 15 minutes (theeffective length of time required to trigger a persistent ischemiacondition in block 862 of FIG. 5).

EL-SN and N-SN flags are set in blocks 1426 and 1428 respectively. Themixed heart rate condition for a negative shift is checked in block 1432and a flag is set as appropriate in block 1436. Analogously to block1438, in block 1440, the positive shift counters N-SP cntr or EL-SP cntrare reset to 0. Processing continues with block 834 of FIG. 5.

Returning to block 1402, if the current segment is not shifted, in block1412, the four ST counters are reset to 0. Processing continues withblock 834 of FIG. 5.

An alternative method for handling the case where a negative ST shifttemporarily persist or worsens after exercise (or more generally atransition from a high heart rate to a low heart), involves checkingwhether a high heart rate condition preceded an ST depression thatoccurred at a low heart rate. FIG. 19 is a block diagram of anembodiment of this method, which may be implemented in conjunction withthe program shown in FIG. 5.

In block 1450, a low heart rate ST shift condition has been detected. Inblock 1452, the routine checks whether any of the last P segments wascharacterized by an elevated or high heart rate. If so, then apersistent low heart rate ST shift condition is not detected and block1454 is skipped. P may be set according to the time after cessation ofexercise/high heart rate that exercise induced ST shifts resolve, theinterval between segment acquisition, and the number of consecutivesegments required to trigger detection of a low heart rate with ST shiftcondition. If there is a 90 second interval between the last sample at ahigh heart rate and the first sample at a normal heart rate, 30 secondsbetween subsequent acquisitions, then (P−1)*30+90 seconds will haveelapsed between the last high heart rate segment and the currentsegment, assuming the first low heart rate segment and all subsequentsegments are above the threshold for detecting ST shifts at normal heartrates. If it is desired to have at 5 minute window after a high heartrate before triggering detection of a persistent low heart rate ST shiftcondition, then P should be set to 8.

In an alternate embodiment, a normal heart rate segment could bereclassified as a high heart rate segment within a certain window afterthe patient's heart rate has changed from high to normal. In this case,the high heart rate ST shift thresholds would be applied to thereclassified segment.

Various other modifications, adaptations, and alternative designs are ofcourse possible in light of the above teachings. Therefore, it should beunderstood at this time that, within the scope of the appended claims,the invention can be practiced otherwise than as specifically describedherein.

1. A cardiac event detection system for detecting a cardiac event in apatient comprising: (a) at least two electrodes for sensing anelectrogram electrical signal from said patient's heart; (b) animplantable device coupled to said electrodes, said implantable devicehaving an analog-to-digital circuit system contained therein fordigitizing said electrogram electrical signal to produce electrogramsegments; (c) a processor contained in said implantable device andelectrically coupled to said electrodes, said processor including meansfor determining whether an electrogram segment qualifies as a baselinesegment, said processor further including means for tracking the failureof electrogram segments to qualify as baseline electrogram segments. 2.The system of claim 1 wherein the means for tracking includes means fordetermining whether no electrogram segments have qualified as a baselineelectrogram segment over a baseline alert time period.
 3. The system ofclaim 2 where implanted device includes patient alerting means which areactivated following determination that no electrogram segments havequalified as a baseline electrogram segment over the baseline alert timeperiod.
 4. The system of claim 2 wherein the inability to collect abaseline electrogram segment is caused by the patient's heart rate beinghigher than a preset normal heart rate range.
 5. The system of claim 2wherein the inability to collect a baseline electrogram segment iscaused by the patient's heart rate being lower than a preset normalheart rate range.
 6. The system of claim 2 wherein the inability tocollect a baseline electrogram segment is caused by the patient's heartrate being irregular than a preset normal heart rate range.
 7. Thesystem of claim 2 wherein the inability to collect a baselineelectrogram segment is caused by the patient's electrogram segmentshaving too many abnormal beats to qualify as a baseline electrogramsegment.
 8. The system of claim 2 wherein at least one of the electrodesis located within the heart.
 9. The system of claim 8 wherein theelectrode located within the heart is located within the rightventricle.
 10. The system of claim 1 wherein at least one electrode islocated subcutaneously.
 11. A cardiac event detection system fordetecting a cardiac event in a patient comprising: (a) at least twoelectrodes for sensing an electrogram electrical signal from saidpatient's heart; (b) an implantable device coupled to said electrodes,said implantable device having an analog-to-digital circuit systemcontained therein for digitizing said electrogram electrical signal,thereby generating a digitized electrogram; (c) a processor contained insaid implantable device and electrically coupled to said electrodes,said processor including means for detecting ST segment shifted beatswithin the digitized electrogram and for computing the heart rateassociated with various portions of the digitized electrogram, theprocessor further including means for detecting a cardiac event basedupon both the duration of an ST shift and the heart rate.
 12. Thecardiac event detection system of claim 11 wherein the processor furtherincluding means for detecting the cardiac event based upon both theduration of an ST shift and a change in the heart rate.
 13. The cardiacevent detection system of claim 12 wherein the cardiac event is detectedby comparing the ST shift of at least one heart beat with a heart ratedependent threshold.
 14. The cardiac event detection system of claim 13wherein the heart rate dependent threshold is selected based on a higherheart rate than the current heart rate when the higher heart rateoccurred within a specified amount of time before a current heart beatwas acquired.
 15. The cardiac event detection system of claim 11 whereinelectrogram segments are categorized according to ST shift and heartrate, and wherein the duration of an ST shift and the heart rate aredetermined based on the categorization of electrogram segments.
 16. Thecardiac event detection system of claim 11 wherein the cardiac event isdetected based on an inverse relationship between heart rate andduration of an ST shift.
 17. The cardiac event detection system of claim16 wherein electrogram segments are categorized according to ST shiftand heart rate, and wherein the duration of an ST shift and the heartrate are determined based on the categorization of electrogram segments,and wherein the inverse relationship between heart rate and duration ofan ST shift is implemented by requiring a greater number of ST shiftedelectrogram segments at a higher heart rate category compared to a lowerheart rate category.
 18. A cardiac event detection system for detectinga cardiac event in a patient comprising: (a) at least two electrodes forsensing an electrogram electrical signal from said patient's heart; (b)an implantable device coupled to said electrodes, said implantabledevice having an analog-to-digital circuit system contained therein fordigitizing said electrogram electrical signal, thereby generating adigitized electrogram; (c) a processor contained in said implantabledevice and electrically coupled to said electrodes, said processorincluding means for detecting ST segment shifted beats within thedigitized electrogram and for computing the heart rate associated withvarious portions of the digitized electrogram, the processor furtherincluding means for detecting a cardiac event based upon both theduration of an ST shift and heart rate, wherein the duration of an STshift that will trigger detection of a cardiac event varies according tothe polarity of the ST shift.
 19. The cardiac event detection system ofclaim 18 wherein the duration of an ST shift that will trigger detectionof a cardiac event varies according to the heart rate associated withthe ST shift.
 20. The cardiac event detection system of claim 19 whereina first electrode is implantable within the heart and a second electrodeis implantable outside of the heart, and wherein a positive ST deviationis defined as the second electrode having a greater potential than thefirst electrode, and wherein an event is detected when: (i) a positiveST shift at a normal heart rate range lasts at least A seconds, (ii) apositive ST shift at a high heart rate range lasts at least B seconds;(iii) a negative ST shift at a normal heart rate range lasts at least Cseconds, and (iv) a negative ST shift at a high heart rate range lastsat least D seconds, wherein A is less than C and B is less than D, andwherein A is less than B and C is less than D.